In the Kauaʻi airport there is an art project about time zones:
Many people who've dealt with calendars or who have traveled a lot would consider this an improvement. Why are time zones so hard?
At a basic level, they don't make sense to people. Most people don't travel outside of their own time zone very often and while it's more and more common to have family and friends in other time zones, we still don't talk with them regularly. They don't map to how we think about times in our minds; to most people, a 10AM meeting is a 10AM meeting, it's not a 10AM meeting in their own time zone. Smart people with amazing tools will still schedule a 2 hour long 10AM meeting (Pacific time) on Friday with staff in London (6PM GMT) and wonder why the Londoners are a bit… put out.
At a technical level, they are the worst kind of problem: they involve social conventions, geographic boundaries, and political maneuvering:
- Daylight savings time changes are not fixed in stone. The US Congress has changed the start and end of Daylight Savings time in the United States several times. Different countries choose different daylight savings boundaries. Different parts of the same country will choose different daylight savings boundaries or may choose to ignore daylight savings time entirely. This means if you want to schedule things in the future or accurately look at times in the past you need a database of all of these changes.
While it is true that time zones are measured in terms of an offset from UTC, it is not true that you can infer a time zone from that offset. Knowing that I'm -0800 from UTC tells you that you should subtract 8 hours from UTC to show me my local time, but it doesn't tell you anything about the time zone that I am operating within.
Customers often don't know the names of time zones. This is alleviated, somewhat, by asking for the name of the nearest major city and using that to determine the time zone in question.
It could be worse. You could be writing software for Antarctica:
OK, so we get it. Time zones are a mess. What do we do about it?
If you're an engineer:
Keep your internal times in UTC and convert to/from whatever the customer is set to as close to the customer as possible. Ideally, you convert into the local time zone at display.
Much like you need to keep track of the encoding of a string or it's not a string, you need to keep the time zone of a date or it's just a sweet, pretty lie that will nuke you later. Possibly at 2AM in whatever time zone is going to make that most painful for you.
If you see an API that takes an offset for a time zone instead of a name, know that the API is probably broken and you will get burned. Later. Probably at 2AM in whatever time zone is going to be most painful for you. It's (sort of) ok for dates to tell you their offset from UTC, since they represent a moment in time and you can, in theory, only have one offset for a given date… (but remember, you can't use this offset to figure out what the original time zone was…).
If you're just trying to use software that's built on top of this mess:
Keep your computer, your phone, and your calendar set to the time zone that you are currently in. Modern systems will automatically detect when you change time zones and will update accordingly. You should let them.
When scheduling things in your calendar, always schedule them in the time zone that the event will be in. Meeting someone at 10AM in London in 2 weeks? Put it in your calendar for 10AM in London's time zone. Most modern calendars will let you temporarily switch the display to any given time zone which makes this easier to do. This can be difficult from a phone; iOS makes this particularly confusing.
Having a clock that shows you the current time in a few time zones can be very handy. On my iPad I setup the Clock app to show the current time in any timezone where a co-worker or close friend lives. In addition to being helpful when deciding if I should give them a ring, it's also a nice way to be a little more aware of the people who are far away.
If you're working with people who are in another timezone, consider leaving your desktop calendar set to their timezone by default; it can make scheduling easier when you know that the 1PM Pacific meeting is actually 10PM your time.
The most important thing, of course, is to remember that usually when you're dealing with time zone issues you're also dealing with people; nobody likes being woken up by a poorly timed call.