TZ Database
Introduction
Everything related to time zones [1] has always been a programmer's nightmare. From the introduction of Julian calendar system in 45 B.C. to the adoption of Gregorian calendar system in 1582, Coordinated Universal Time (UTC [2]) and international calendars, dates and times have moved to unstable world of geopolitics and newly discovered scientific views.
Since time-related data is a standard requirement for many applications and operating systems, programmers are faced with the challenge of resolving numerous time-zone-related issues, with daylight saving time (DST [3]) problem being the most difficult of them.
Why It’s Difficult to Discover Local Time Zones: DST Problem
DST is observed not everywhere. Although the offset for DST is typically one hour, there are exceptions to this rule. Typically, the DST transition takes place on Sunday, but some countries have transitions to DST on other day of the week. The time of day when change to DST takes place can be designated by law in local "wall clock" time [4], in local "standard time," or in UTC. Besides, not all countries use a set day of the week to change to DST. There are countries that use a set date for scheduling the transitions. Moreover, not everyone adheres to the Gregorian calendar when it comes to scheduling DST change, and consequently, time zone rule engines which employ solely the Gregorian Calendar system will need an updated ruleset every year, even if the "native" rules remain unchanged. Furthermore, there are countries where DST transition dates are debated, negotiated, and agreed upon every year. There can be several offset transitions during the twelve-month period. Some countries can have offset transitions that have nothing to do with DST. For instance, in 1946 Hawaii decided to change its standard time offset from -10.5 hrs to -10 hrs, which wasn't a DST offset at all. To complicate things, changes to "the rules" can be made any time of the year.
Zoneinfo Database
Regardless of the time zone we live in, we’d better be aware of the fact that changes in DST and timezone regulations can be implemented sooner or later, and be prepared to set clocks accordingly when these changes occur. Different operating systems and programs that need to know the exact time in certain locations must stay updated with the most recent DST changes, otherwise they risk displaying incorrect time.
Since there were no international entity to keep track of timezones and ever-changing DST rules used in each of them, the time zone database (tz database, also known as zoneinfo database or Olson database) was created in 1986. Eventually, it became a widely used source for time zone information, including historical rules.
This database regularly updates its data to reflect new changes in the timezone information or DST rules in different corners of the world. At the moment of this writing, the rate of change of the data section in it is between approximately 7-20 updates each year, with each update having one or more changes.
Zoneinfo database is used in many operating systems including BSDs, MacOS, Linux, Solaris, and UNIX.
Basic Rules of TZ Database
The time zones of the tz database have been given names according to the form "Area/Location", e.g. "America/Detroit", "Europe/Stockholm" in order to make them more understandable to people. It was also decided to use English names or transliterated equivalents, and to leave out punctuation marks and suffixes.
Area in the database represents the name of a continent, ocean or "Etc". The latter ("Etc") is used for some administrative zones, e.g. for "Etc/UTC".
Each location of the zoneinfo database is used to represent a specific location of the region where all clocks displaying local time have agreed since 1970. Locations are represented either by continent or by ocean. Then goes the location's name, which is usually the largest city of the region. Database maintainers rejected the idea of using country names in this database on the assumption that they are vulnerable to geopolitical changes. Geopolitics is a sensible subject and if a certain application contains outdated data about the country's boundaries and time zones, a heated controversy can arise among the nations. Thus, the founders of tz database decided to use the names of the largest cities because that they are less likely to be changed, regardless of political upheavals.
In case the name of a city changes, a special alias is created in next updates so that both the old and new names represent the same tz database entry. In addition, different cities which now represent the same time zone can have different names provided they differed at some point in the past (for example, "America/Detroit" vs. "America/New_York").
Contributors, whose Efforts Made TZ Database What It Is
The founding father of tz database is Arthur David Olson, who, at the time of this writing (December 2010), is still the one responsible for writing and making changes to the code that is used to build and access the database. That's why tz database is often called the Olson database. However, the zoneinfo project wouldn't have developed into the most thorough and up-to-the-minute source of time zone information without the efforts of Paul Eggert, who has maintained the data itself for all these years and has been the editor for nearly all the data that is included in the database at present.
In addition, a large number of volunteers from all over the world made their contributions to the project development by participating in the discussions about time zones and suggesting additions or changes to the database in the tz mailing list coordinated by Arthur Olson. Anyone who has suggestions how to improve tz database can send an email to the tz mailing list, which is a sort of a discussion forum about time zones and tz database.
Footnotes
[1] Time zones are longitudinal divisions of the Earth where a standard time is kept. Of all 24 time zones the Greenwich meridian is the primary division. Each division observes a clock time one hour earlier than the time zone it borders on the East.
[2] UTC is an abbreviation for Coordinated Universal Time, which serves as the basis for civil time. Although there exist minor technical differences between UTC and Greenwich Mean Time (GMT), in the common sense as understood by non-scientists, UTC, GMT, and Zulu time are the same concepts.
[3] DST (Daylight Saving Time) is a standard practice of setting the clocks ahead of local standard time in order to provide more daylight in the evenings.
[4] Wall clock time identifies the local time with any applicable adjustments for DST. The term was coined to refer to a time without the need to specify standard time or DST. Essentially, it means the time as displayed by a local clock hanging "on the wall".