[ANN] Major Windows DST Bug

Ken Ray kray at sonsothunder.com
Mon Mar 12 17:06:05 EDT 2007


I have uncovered a Major (BLOCKER) Windows bug related to the most 
recent change in Daylight Savings Time for the United States. 
Revolution will overcompensate for the DST by adding and additional 
hour to the time whenever you execute 'convert'. To see what I mean, 
make sure you have "Automatically adjust clock for Daylight Savings 
Time" turned on in your Date/Time prefs, launch Rev (or MC) under at 
least XP Pro or Vista Home Premium (the two systems I tested), and type:

  put the time into x;convert x to long time;put x

You should see that the time you get back is one more hour ahead of 
your current time. So if it is currently 2:05 PM without the DST 
adjustment, and you have the checkbox checked, Windows will show that 
it is 3:05 PM (correct). But if you run the code above, x will be 
"4:05:00 PM".

I can only assume that when Rev asks the OS for the time it gets two 
factors the non-adjusted time, and a flag whether DST is currently 
applied. In the past, Windows would have handed over "2:05" and "True" 
(in the example above), and Rev would have adjusted the time 
accordingly. But the latest Windows XP/Vista DST patch seems to be 
handing over the ADJUSTED time, and the flag, so it would hand over 
"3:05" and "True", so Rev is over-adjusting by another hour.

There is no easy scripted fix other than finding every location where 
'convert' is used and parsing strings into chunks.... yechh!

I have logged this into Bugzilla as bug #4526.

This is a MAJOR BLOCKER problem and is going to hit a LOT of people, so 
forwarned is forearmed...

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list