What is "timezone"

Timezone represents a region that has always presented the same local time during its history, or at least since 1970, as per definition of IANA (a set of civil-time clocks that have all agreed Since 1970) - although many timezones have information prior to this year.

Do not confuse Timezone with "the difference in hours and minutes from a reference time (Greenwich/GMT/UTC)" - also called offset - because a Timezone has the history of changes of this difference (the most common case is daylight saving time, in which the offset - the difference with UTC - changes, but Timezone remains the same).

Different regions of the planet have different timezones, defined by law. Each Timezone has an identifier, such as America/Sao_Paulo or Europe/Lisbon, which contains the history of offsets that that region had, has and will have. Another point is that, because they are defined by governments, the rules of timezones (the difference with regard to UTC, whether it will have daylight saving or not, etc) tend to change all the time.

Use this tag for questions about timezone representation, or time zone calculations.

Differences between Timezone and offset

It is common to think that a Timezone is simply the difference with UTC (offset), but in fact they are not the same thing.

A offset is simply a numerical value that represents the difference from UTC. For example, -03:00 is a offset which represents 3 hours less than UTC.

Already a Timezone contains the history of offsets of a particular region throughout its history. For example, Timezone America/Sao_Paulo uses the offset -03:00 for most of the year, but during daylight offset mute to -02:00 (but Timezone remains the same: America/Sao_Paulo). In addition, each year daylight saving time starts and ends on a different date, and all this information is part of the history that Timezone contains.

Given a given date and time, it is possible to determine the offset that a Timezone uses at that time. But given only one offset, it is not possible to determine a single Timezone, since there are several timezones that use the same offset. For example, America/Sao_Paulo and America/Recife use -03:00 for most of the year (except during daylight saving, which Recife currently does not have), so given only the value of the offset (-03:00) and a date when São Paulo is not in daylight time, it is not possible to know which of the two timezones I am referring to.

Abbreviations

In some parts of the world it is common to use timezone abbreviations, such as PST (Pacific Standard Time, used on the west coast of the USA) or CET (Central European Time, used in many European countries).

The problem is that these abbreviations are not timezones in fact, as they do not have the history of offsets of a region. PST, for example, is the name used on the west coast of the USA when it is not in daylight time and the offset is -08:00 (8 hours less with respect to UTC). But when this region is in daylight time, they change the name to PDT (Pacific Daylight Time) and the offset mute to -07:00.

Therefore PST and PDT are at most "nicknames" for the offsets used in that region. The Timezone used in these places, in this case, depends on the region (America/Los_Angeles in California, Canada/Yukon in Yukon, etc). There are several different timezones because each of these regions has a different history of offsets (they may have adopted daylight saving time on different dates, or simply don’t use it, etc.), although they all use the abbreviation PST (and PDT, in places that have daylight saving time).

Another detail is that many abbreviations are ambiguous. IST, for example, is used in India, Ireland and Israel (and in each of these places it represents a offsets different, and therefore, distinct timezones). See this list of timezone abbreviations to get an idea of how many ambiguous cases there are.

Also, in many places, the "official" abbreviation defined by the above list is not used - as in Brazil, where no one uses the terms BRT (Brasília Time) and BRST (Brasília Summer Time).

Not always the offset is a "busy hour"

Most current timezones use offsets of "full hours", such as -03:00 or +08:00. But there are places that use "broken" values, such as India, currently using the offset +05:30 (5.5 hours ahead of UTC), and Nepal, who uses the offset +05:45 (5 hours and 45 minutes ahead of UTC).

Databases of timezones

There are two timezone databases that are most used:

1- The Microsoft Windows Time Zone Database

Uses transponders like "Eastern Standard Time". You can get the list of all timezones using one of these methods:

  • By Windows Registry Key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
  • Use the command tzutil.exe /l, and checking the second row of each result.
    (The first line shows the display name)
  • Call the function TimeZoneInfo.GetSystemTimeZones of the . NET, looking at the property Id Property of each object TimeZoneInfo returned.
  • Call the function EnumDynamicTimeZoneInformation of Win32, looking at the countryside TimeZoneKeyName of each object DYNAMIC_TIME_ZONE_INFORMATION returned.

Perks

  • Already installed with Windows.
  • It is automatically updated by Windows Update.
  • Easy to use by Win32 and . NET Framework Apis on Windows.
  • From the Update of June 2016, covers the entire planet except for a few Antarctic research stations.

Disadvantages

  • Maintained by Microsoft (instead of a group/community).
  • Timezones tend to be too broad, covering many different countries instead of covering more specific regions.
  • It does not have very old data, and there is a lot of inconsistency with the initial year of each Timezone.
  • Interoperability with non-Microsoft platforms is very complicated.
  • At best, there are monthly updates, which may not be ideal for last minute changes.
    • Previously, many changes were made only in Hotfixes, but this has changed in recent years, so that now all changes are made in regular updates.
  • The names are confusing and without much discretion. Naming conventions have changed over the years and there is a lot of inconsistency. Generally speaking, Windows timezone names are unreliable to determine a specific region. It is preferable to choose a Timezone based on your display name.

    Some examples:

    • "Eastern Standard Time" refers to both EST and EDT (US East Coast Daylight Saving Time).
    • "Mountain Standard Time" stands for MST and MDT, while "US Mountain Standard Time" refers only to the state of Arizona (which uses only MST all year).
    • "US Eastern Standard Time" adopts daylight saving time, but only from 2006. It is used in most of the state of Indiana.
    • "Romance Standard Time" seems to be a invented term.
    • "W. Europe Standard Time" is the identifier for several countries that adopt the Central European Time, but not the Western European Time
    • "AUS Eastern Standard Time" and "E. Australia Standard Time" differ only by daylight saving time.
    • "Arab Standard Time", "Arabian Standard Time" and "Arabic Standard Time" are 3 completely different timezones with similar names..
    • "SA Pacific Standard Time" and "Pacific SA Standard Time" are also completely different timezones.
    • "Russia Time Zone 3", "Russia Time Zone 10" and "Russia Time Zone 11" are valid identifiers, but other timezones in Russia have names instead of numbers.
    • "UTC", "UTC-02", "UTC-08", "UTC-09", "UTC-11" and "UTC+12" are valid identifiers, but other offsets are not.
  • As already mentioned, Windows timezones also have a display name.
    For example, "(UTC-05:00) Eastern Time (US & Canada)".

    • These names have a offset, but these represent the offset when it’s not daylight saving time, and not the offset current. This can be confusing, since the offset shown may not be what is being used at the moment.
    • The Names display are translated to the language configured in Windows. When used via TimeZoneInfo of. NET, translations are not updated according to the current configuration. For example, if you have an application that shows the data to an English-speaking user, but the server is in Japanese, the display name will be shown in Japanese.

2- The IANA/Olson Time Zone Database

Also known as Zoneinfo, TZDB or TZ database. Uses identifiers such as "America/New_York".

Perks

  • Widely used in Linux, Mac, Java, PHP and many other platforms and languages.
  • Libraries available for Javascript and Windows/. Net.
  • Distinct timezones covering specific regions.
  • It covers all the places on the planet.
  • Contains historical data on timezone changes.
  • Referenced in many Rfcs and other standards.
  • Maintained by the community, recently with the support of IANA.
  • Frequent updates several times a year.
  • Some implementations facilitate the upgrade process:

Disadvantages

  • Most implementations require manual updates, such as Noda Time, Joda Time, PHP, among others. Nevertheless, the possibility of manual updating could even be considered an advantage.
  • There are many timezones, which can make it very difficult to show them in a simple list for your users. However, there are map-based interfaces, such as this, which can help provide a more user-friendly interface.

See more details on Wikipedia.

Map of IANA timezones

This map shows all IANA timezones around the world. Note that there are several countries that have more than one Timezone.

Mapa de timezones TZDB Source: Eric Muller

CLDR

The CLDR (Unicode Common Locale Data Repository) maintains translations of IANA timezone names, as well as a mapping between Windows and IANA identifiers.

The mapping is available in the second table of this page, or in XML format at this link. Note that there is usually more than one IANA Timezone for a Windows Timezone. Thus, it is possible to convert an IANA Timezone to a single Windows Timezone, but the opposite is not possible because there are several alternatives available. Note also that while there are mappings for all Windows timezones, not all IANA identifiers are mapped. Therefore, it is always possible to convert a Windows Timezone to one or more of the IANA, but the opposite is not always possible.

Related: How to convert between Windows and IANA timezones into . NET.

More information

PS: all offset values mentioned as "current" refer to December 2018. Should any of these countries change their offsets in the future, their information should be updated.