
my time, what time is it for them? When I know the friend’s time zone, I can map it to their current offset. That’s because outside of programming, I’d probably be using these terms to ask a friend for their time zone so I’ll know their offset from my time. Notice I said, “Sometimes Coral Harbour and Detroit have the same offset, and sometimes they don’t.” Outside of programming, I’d say, “Sometimes Coral Harbour and Detroit have the same time zone, and sometimes they don’t.” That’s why a calendar systems work with time zones, offsets, and UTC we need the offset to go from local time to UTC, and we need the time zone to go from UTC to local time. Given a time zone and an offset, you don’t know much. Given UTC and an offset, you can know the local time. Given a local time and an offset, you can know UTC time, but you do not know which time zone you’re in (because multiple timezones have the same offset). Given a time zone and a UTC time, you can know the offset-and therefore the local time. For example, Coral Harbour has not always been five hours behind GMT for a few months in 19, it was six hours behind GMT.

Why are there so many time zones that seem to share the same offset? A time zone is a place defined by its offset history. At any given moment, an offset is usually shared by multiple time zones. A time zone is a place that can map to different offsets, depending on what time of year it is or which year it is. The most important thing we can learn about Coral Harbour and Detroit here is that there is a many-to-many relationship between time zones and offsets. They aren’t a good source of information when we’re programming, because some of them share the same initials, and the places they are associated with can change. To make our lives harder, they are also called “time zones” in casual conversation.

A time zone’s offset can change throughout the year because of Daylight Saving Time. An offset is the number of hours or minutes a certain time zone is ahead of or behind GMT**.In fact, the map above pointing out Coral Harbor and Detroit is a map of time zones around the world. So sometimes, the good people of Coral Harbour and the good people of Detroit have the same offset. America/Detroit changes during the year from an -0400 offset to an -0500 offset. With laws as they are now, the America/Coral_Harbour time zone has an unchanging offset of -0500, or five hours “behind” GMT, which for our purposes here matches UTC. Our ExampleĪmerica/Coral_Harbour is a time zone (for simplicity, I will focus only on IANA* time zones).


Here, I want to make the difference crystal-clear, so each of us can make our own decisions about when to use which (or both). It has been said many times, many ways: Offsets are not time zones, and time zones are not offsets! Some blog posts argue for one over the other.
