[TYPO3] Daylight Savings Time and Windows XP

Jeff Segars jsegars at alumni.rice.edu
Wed Mar 7 19:34:40 CET 2007


After spending the last couple days debugging backend date and time 
handling, I found some interesting issues surrounding backend entry of 
dates from Windows XP and Daylight Savings Time.

Daylight Savings Time is changing this year in the United States to 
begin two weeks earlier and end two weeks later. The short summary of 
the problem is that if you use Windows XP and try to enter dates in 
previous years during this two week change window (ie.  March 24, 2006) 
then everything will be an hour off.

********

Now, onto the full details in the hopes that someone has a solution :)

As a result of the change in Daylight Savings Time, Microsoft issued a 
patch to update the DST rules. Windows XP (and previous versions of 
Windows) only support a single set of DST rules and do not support 
anything historical. This means that once the DST patch is applied, 
Windows calculates dates and times using the new DST rules, regardless 
of whether your date and time is in 1900, 2006, or 2007. See [1] and [2] 
for more information.

Within TYPO3, client-side Javascript converts the human readable dates 
you enter into timestamps that are then transmitted back to your server 
when you save a record. Since these timestamps are calculated on the 
client side, they are affected by the Windows DST problems. Internet 
Explorer, Firefox, and other browsers use the same underlying OS calls 
for date functionality in Javascript, so its tied directly to the OS, 
not the browser. Even if you run TYPO3 on a Linux server, entering 
backend dates and times from Windows will cause this problem to appear.

For date/time fields within the DST change window, this results in 
records that are an hour off.  For date only fields within the DST 
change window, this results in records that are an entire day off. TYPO3 
stores dates on a midnight boundary and the hour shift pushes it back to 
11:00 pm on the previous day.

For now, we're stuck telling our users to enter dates one day off if 
they happen to fall within this DST change window.  Does anyone have 
better suggestions about how it might be handled?

Thanks,
Jeff


[1] - 
http://www.hanselman.com/blog/KB928388BreakingTestsWithWindowsDSTTimeZonePatchAndPastDates.aspx
[2] - http://blogs.msdn.com/michkap/archive/2007/02/05/1606868.aspx
[3] - 
http://webempoweredchurch.org/home/single/article/some-old-datestimes-not-displaying-currectly-due-to-windows-bug/


More information about the TYPO3-english mailing list