Hi folks,
I've posted a fix for the DST problem, at
http://www.projectpluto.com/new.htm
HOWEVER, be advised that if you wait until Sunday,
the problem will go away. Turns out there's a problem
with certain versions of the Microsoft C runtime library:
if DST begins in a month that starts on Sunday, it waits
a week before instituting the DST changeover. Hence,
according to Microsoft, DST will not occur until 15 March,
not 8 March. (And yes, I'm ready for the inevitable
"beware the ides of March!" comments.)
The bug affects certain time functions, but not all.
That's why I found myself staring in bemusement at some test
code I wrote, which showed that different time functions
in the Microsoft library were returning different times.
Fortunately, Bill Appelbaum e-mailed me about this, and
described the problem. He adds: "We haven't had a March
or November starting on Sunday since 1998, so the bug hasn't
manifested itself until now."
March and November always start on the same day of the
week, so if you face the problem in March, you'll have it
again in November.
Many thanks to all who replied on this issue. I've had
several reasons to curse DST over the years. Guess I can
add this to the list.
-- Bill