Daylight savings in databases
I feel tired today, because it feels like I got up an hour earlier than normal. Didn't help that I went to bed at a normal 'time', with my body wondering why I was going to bed early. And of course the kids had to be off to school at what felt like really early to them as well.
Databases suck when it comes to daylight savings. Typically the server they are installed on will be set to a timezone that will adjust automatically, and the database doesn't record the timezone with a datetime field. So an event that starts with a getdate() and then closes a few minutes later with another getdate() suddenly seems to take over an hour, or perhaps negative time.
One option is to have databases on machines that don't adjust for daylight savings, and then adjust according to the local time of the client (or web server). But then you find that the events of a week ago seem to change by an hour, because they were being displayed in winter time, and suddenly now they're being displayed as summer time. And users really hate that.
It would be really nice if databases could be configured to understand daylight savings really well, so that you could ask them how many hours there were in March or October (eg: datediff(hour, '1-oct-2005', '1-nov-2005') ) and have it give you an odd number, not an even one. Or even better, the western world could just accept that everyone is happy with having the day centred around 1pm, and leave daylight savings on all year round. Everyone seems to prefer having more daylight in the evenings than in the mornings, so where's the problem? (Except that Greenwich Mean Time would never be correct in Greenwich)