Skip to main content
Participant
March 13, 2011
Question

Daylight savings time bug?

  • March 13, 2011
  • 2 replies
  • 860 views

I woke up this morning to find 3 of my sites all encountering a variation of this error:

Date value passed to date function createDateTime is either unspecified or invalid. Specify a valid date in createDateTime function.

Hour '2' specified in {ts '2011-3-13 2:0:0'} does not exist in the timezone Eastern Standard Time, if Daylight Saving Time is enabled.

Today is the first day of daylight savings time, and the code affected hasn't been altered in years. Is anyone else encountering this error? Any idea how to fix?

    This topic has been closed for replies.

    2 replies

    Inspiring
    March 13, 2011

    On 3/13/2011 8:45 PM, cffool said:

    in {ts '2011-3-13 2:0:0'} does not exist in the timezone Eastern Standard

    Time, if Daylight Saving Time is enabled.

    that's correct. you've fallen into tz hell.

    Today is the first day of daylight savings time, and the code affected hasn't

    been altered in years. Is anyone else encountering this error? Any idea how

    to fix?

    different versions of cf/JVM? change tz?

    cffoolAuthor
    Participant
    March 13, 2011

    I was able to temporarily work around this issue by changing the time generated in the timestamp.

    It seems that 2:00 doesn't exist anymore. I updated it to 3:00 and it works.

    Obviously this won't work for everyone, but it does avoid the error for me.

    Inspiring
    March 13, 2011

    It seems that 2:00 doesn't exist anymore. I updated it to 3:00 and it works.

    It seems more odd to me that you didn't get the problem in the past.  On the spring DLS changeover day, the hour 0200-0259 indeed doesn't exist.  So it's correct to get an error for a date/time function that received inputs suggesting that there is times between those two boundaries.

    Where did the string "{ts '2011-3-13 2:0:0'}" come from?  Can you show the exact code that yields that error?  From the point of that string being created, through to the createDateTime() line that's erroring (omit anything in between that's irrelevant ;-)

    --

    Adam