tracker issue : CF-3971009

select a category, or use search below
(searches all categories and all time range)
Title:

CF10 CreateDateTime failure

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/AsDesigned

Reporter/Name(from Bugbase): Michel Monette / Michel Monette (Michel Monette)

Created: 04/16/2015

Components: Language, Functions

Versions: 10.0

Failure Type: Usability Issue

Found In Build/Fixed In Build: 3.0 Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 1

Problem Description:

I’m having a problem with the CreateDateTime function in CF10.

<cfset x = createdatetime(2015,3,8,2,0,0)>

Throws this error:
Date value passed to date function createDateTime is unspecified or invalid.
Of course 02:00 on March 8th 2015 doesn’t really exist because of the time change, but it probably shouldn’t throw an error.

Is there a patch or a work around for this? We upgraded from CF7 last spring ( after the time change ), it wasn’t an issue in CF7.

Steps to Reproduce:

<html>
<head><title>Hello World</title></head>
<body>
<cfoutput>#ucase("hello world")#</cfoutput>
<cfset x = createdatetime(2015,3,8,2,0,0)>
</body>
</html>

Actual Result:

Page errors with a: Date value passed to date function createDateTime is unspecified or invalid.

Expected Result:

Note to error out.

Any Workarounds:

None.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3971009

External Customer Info:
External Company:  
External Customer Name: Michel
External Customer Email:  
External Test Config: My Hardware and Environment details:



Windows 7 64bit

Builder 3 64bit

Attachments:

Comments:

I have been unable to retest this as my demo has run out. I am working on getting another system setup.
Comment by External U.
7868 | April 16, 2015 07:30:26 AM GMT
This is a Coldfusion Server issue not a builder issue.
Comment by External U.
7869 | April 28, 2015 08:44:55 AM GMT
"Of course 02:00 on March 8th 2015 doesn’t really exist because of the time change, but it probably shouldn’t throw an error." What should it do instead? Raising an exception is *precisely* what it should do if the inputs aren't valid.
Comment by External U.
7870 | June 05, 2015 01:15:23 AM GMT
ha, I never read this part "Of course 02:00 on March 8th 2015 doesn’t really exist because of the time change" tell that to ppl in Arizona. Of course it exists. i even changed my timezone to see if it affected the outcome, it does not. all times between 2:00:00 and 2:59:59 throw the error.
Comment by External U.
7871 | June 05, 2015 08:02:37 AM GMT
this should be fixed and moved to server issues.
Vote by External U.
7879 | June 05, 2015 08:05:57 AM GMT
BTW, createdatetime(2015,11,1,2,0,0) works even with the theory of that time not existing
Comment by External U.
7872 | June 05, 2015 08:09:38 AM GMT
Whether the exception is thrown by the function or not, depends on the system date and time settings. For locales that observe DST, the exception should be thrown, which I believe is the expected behavior. That is what I observe (with standalone CF10 Update 16, on Win 7x64) as well. I don't see the exception when I am set to Arizona timezone. Derek, Can you confirm if you restarted the CF service after changing your timezone. You can verify the time settings CF is picking up, by using the "GetTimeZoneInfo()" method.
Comment by Piyush K.
7873 | June 07, 2015 09:19:36 AM GMT
Derek: my own experimentation does not bear out your findings. If I change my TZ to US/Central, I cannot create a CF date/time 2015,3,8,2,30,0. If I change it US/Arizona, I can. This is what I'd expect. I am running on Java 1.8.0_25, Windows 7 64-bit, although I don't expect any of that would matter. Code I'm using is here: https://gist.github.com/adamcameron/2f03a09008ef9dffa8cd HTH, and do report back, eh? -- Adam
Comment by External U.
7874 | June 07, 2015 10:00:03 AM GMT
ok, I restarted CF and it didn't throw an error with AZ. But still does not explain this being valid however createdatetime(2015,11,1,2,0,0) that's when DST ends this year.
Comment by External U.
7875 | June 07, 2015 11:48:12 AM GMT
Well... at the stroke of 2am, Nov 1, the clocks go back to 1am, right? So what would the time be... one hour later? 2am. It's only when the clocks go *forward* that there's time "missing" from the day.
Comment by External U.
7876 | June 07, 2015 12:00:10 PM GMT
oh ya duh.
Comment by External U.
7877 | June 07, 2015 12:08:24 PM GMT
Closing this since the behavior is as expected. Thanks All.
Comment by Piyush K.
7878 | June 16, 2015 03:20:24 AM GMT