Daylight Savings Time Woes

December 22, 2009

Daylight Savings Time (DST) is one of those things you don’t really think about. You get an extra hour in bed in the Spring and an hour less in the Autumn, other than that and having to change the clocks you don’t have to think about much. Oh my, just be wait until you have to work on a system that has to deal with these…

Here in Blighty we call it British Summer Time (BST). This year (2009) BST started on Sunday, March 29th at 01:00 GMT, and ended on Sunday, October 25th at 01:00 GMT (02:00 BST).

If you system is dealing with dates that are in GMT everything is fine and dandy. Not quite so if you are given dates in BST, however still fairly easy to handle if you have a good time library. The issues pop up when you get given times in local time, and have no idea whether they are BST or GMT. When the times are changed back in the autumn there is a period when 01:33 could be BST or GMT.

The solution for this is quite simple though: NEVER EVER SEND TIMES IN LOCAL TIME, ESPECIALLY NOT WITHOUT A TIMEZONE.