« An interesting mix (of oil and water, kind of) | Main | Adjusting algorithms for dynamic languages »

January 10, 2007

Surprise -- DST comes early this year

A question today about plans for Daylight Saving changes came as a bit of a shock. I'd forgotten that dates for Daylight Saving Time (in the US) change this year. DST starts 3 weeks earlier (2nd Sunday of March--March 11--instead of 1st of April) and ends a week later. This changed in 2005 (I vaguely remember thinking at the time how far off 2007 was), but doesn't seem to have gotten a lot of attention.

Network/system admins have some work to do in the next couple of months (and any programmers who've unwisely hard-coded DST). Microsoft has a page about patch release plans, though older Windows requires a manual process. Looks like Linux distros have been updating (my Gentoo and Ubuntu machines both work), but any older releases may require manual updating of zoneinfo files.

While testing one of my Linux machines, I got an unexpected error:


$ date -d"03/11/2007 01:59:00"
Sun Mar 11 01:59:00 MST 2007
$ date -d"03/11/2007 02:00:00"
date: invalid date `03/11/2007 02:00:00'
$ date -d"03/11/2007 03:00:00"
Sun Mar 11 03:00:00 MDT 2007

Was somehow expecting date to convert 2am for me, had never thought about how 2am-2:59am does not exist on the day you change to DST (at least, not in timezones that switch). (On the other hand, 1am-1:59am happen twice when switching back to Standard time).

Update: Looks like OS X (10.4.8 fully-patched) is also updated (looks like almost a year ago).


$ date -r 1173603599
Sun Mar 11 01:59:59 MST 2007
$ date -r 1173603600
Sun Mar 11 03:00:00 MDT 2007

Posted by pete at January 10, 2007 5:09 PM