The horror of daylight savings (sorry Perth)
I have friends in Perth, who I have always envied for the fact that they don't apply daylight savings there.
For anyone who somehow has no idea what I'm talking about... because the days are long in the summer, many countries in the world apply 'daylight savings', to effectively shift an hour of daylight from the morning (when people are typically still asleep) to the evening (when people are still able to work). When winter comes around again, they adjust back to 'normal', and have a day centred around noon again.
Personally, I wish the world would just say "Hey, it makes much more sense for us to be centred around 1pm. The working day (9am-5pm) is centred around 1pm, so let's make our timezone match that being the time that the sun is at its highest too." Then we could abolish daylight savings. It might make for winter mornings when the sun doesn't come up until after we're at work, but how is that much different to having the sun go down at 4pm? Much easier if you live near the equator and have days that much more consistent in length. I have a cousin who lives in the Shetland Islands, where at Christmas the sun doesn't quite come up even at noon.
And now Western Australia (the state that contains Perth) is looking to introduce daylight savings. Of course, much of the population is rejoicing. They want to have the hour of daylight shifted from the morning to the evening. They don't want to be woken up by the sun streaming through their windows at 5am - they'd much rather have it stay up until 8pm in the evening.
But pity all the people who ever use computers, and have no idea of the luxury they've always had by not having a timezone adjustment.
Oh I know... Windows is really good this way and will adjust your timezone for you twice a year. Microsoft even bring out patches to fix up Australian computers when the government decides to change the system for the Olympics or Commonwealth games. I'm sure Microsoft will roll its collective all-seeing eyes and produce a patch for Perthites. If not, Michael Kleef will write one himself!
But what does this mean for all the code that was written without considering daylight savings? Surely the fact that you never hear whinges from developers in the rest of the world about daylight savings?
Well, you actually do. It's one of those things that people just live with. But the nightmares caused by daylight savings are many.
So, consider the situation where your server changes timezones. You might have a 2-minute-long event which started at 00:59 and ended 02:01. Or which started at 01:59 and ended at 01:01. Does your code handle that? Do your clients mind if you're working around the clock on something but the timeline suggests you all took an hour off in the middle of a crisis?
Or, consider the situation where your server doesn't change timezones. People start whinging that 'current time' is displayed wrong on the web server. So you translate everything into the user's timezone, but now when they look for that event that occurred at 5pm on a particular day 6 months ago, they can't find it, because they've changed timezone since then and the history figures it must've happened at 4pm.
What happens to the overnight staff who work for that extra hour in Autumn/Fall, or work an hour less in Spring? Do you pay them for that time? The system says they clocked in at 10pm and left at 8am, same as always... Or else they actually have worked an extra hour and break various industrial relation laws. Not to mention the disgruntled person who feels that they've been forced to work an hour less...
People typically make the decision one way or another and just live with it. But poor Perth - they had the luxury of avoiding daylight savings, and may find it forced on them.