tz databaseIANA time zone databasedaylight saving time ruleszoneinfoOlson database

Tz Database: The Global Standard for Time Zone and Daylight Saving Rules

tz Database: The Global Standard for Time Zone and Daylight Saving Rules In our interconnected digital world, ensuring that a computer in Tokyo and a server in New York agree on the exact...

tz Database: The Global Standard for Time Zone and Daylight Saving Rules

In our interconnected digital world, ensuring that a computer in Tokyo and a server in New York agree on the exact moment a transaction occurs is a monumental task. This precision is made possible by the tz database, a collaborative compilation of the world's time zone information and the complex rules governing daylight saving time (DST). Primarily designed for use by operating systems and computer programs, this database serves as the invisible backbone of global digital synchronization.

Also known as tzdata, the zoneinfo database, or the IANA time zone database, it is occasionally referred to as the Olson database in honor of its founding contributor, Arthur David Olson. Since 2005, the database has been maintained and edited by Paul Eggert, with organizational support from ICANN.

The tz database partitions the world into regions where local clocks all show the same time. This map was made by combining version 2023d of the List of tz database time zones with OpenStreetMap data, using open-source software.[1]
The tz database partitions the world into regions where local clocks all show the same time. This map was made by combining version 2023d of the List of tz database time zones with OpenStreetMap data, using open-source software.[1]
: The tz database partitions the world into regions where local clocks all show the same time. This map was made by combining version 2023d of the List of tz database time zones with OpenStreetMap data, using open-source software.[1]

Key Facts

  • Primary Purpose: Provides time zone and daylight saving time rules for computer software and operating systems.
  • Naming Convention: Uses a uniform format such as America/New_York or Europe/Paris.
  • Historical Scope: Records civil time changes and historical time zones dating back to the Unix time epoch (1970).
  • Public Domain: The database and its reference source code are available in the public domain.
  • Maintenance: New editions are published several times per year as changes occur.

Defining a Time Zone

In the context of the tz database, a timezone is defined as any national region where local clocks have all agreed since 1970. It is important to distinguish this from a standard time offset from Coordinated Universal Time (UTC). While a traditional "time zone" might simply refer to a specific offset, a tz database timezone is a geographic area that may utilize multiple offsets, such as switching between standard time and daylight saving time.

Location and Accuracy

The locations selected for the database are representative of entire areas; the time at the named location is the same as the time throughout the entire zone. However, this guarantee of accuracy for the whole region applies specifically to the period from 1970 onwards. For historical data prior to 1970, the rules are only guaranteed to be correct for the specific named location, as regional time differences may have existed in the past.

Naming Conventions and Structure

The database employs a strict and logical naming convention designed by Paul Eggert to ensure compatibility and clarity. These names follow POSIX-style guidelines, using only ASCII letters, dots, hyphens, and underscores, while avoiding digits to prevent ambiguity.

Naming Logic Examples

The database uses specific logic to choose names that are compact and unambiguous. For instance, if a city name is too long or ambiguous, an alternative is chosen.

Examples of Timezone Naming Logic
Name Explanation
America/Costa_Rica Uses the country name because the capital, San José, is ambiguous.
America/New_York Spaces are replaced with underscores.
Asia/Kolkata Uses the name of the most populous city in the zone at the time of setup.
Asia/Sakhalin Uses the island name because the largest city exceeds 14 characters.
America/Bahia_Banderas "de" is removed to keep the name under 14 characters.

The "Etc" Area and GMT Offsets

The special Etc area is used for administrative zones, such as Etc/UTC for Coordinated Universal Time. To maintain POSIX compliance, names beginning with Etc/GMT use a reversed sign convention compared to the standard ISO 8601. In this specific area, zones west of GMT have a positive sign, and those east have a negative sign (e.g., Etc/GMT-14 represents a zone 14 hours ahead of GMT).

Widespread Software Integration

The tz database is integrated into a vast array of modern computing environments. Its presence ensures that developers can rely on accurate time calculations across different platforms.

Commonly Supported Systems and Languages

  • Operating Systems: Android, Solaris, UnixWare, AIX, OpenVMS, and various Unix systems like IRIX and SunOS.
  • Programming Languages: Java (since 1.8), Python (via zoneinfo and pytz), PHP, Ruby (via TZInfo), Go, Rust (via chrono-tz), and Perl.
  • Databases: Oracle (since 10g), PostgreSQL (since 8.0), MongoDB (since 3.6), and Microsoft SQL Server.
  • Data Science & Libraries: Pandas (Python), Boost and Qt (C++), and various JavaScript libraries like moment-timezone.

Historical Context and Legal Resilience

The project's origins date back to 1986 or earlier. In 2011, the database faced a legal challenge in the case of Astrolabe, Inc. v. Olson et al. The lawsuit concerned the use of historical atlas data in the database's mailing list archives. However, the case was resolved in February 2012 when Astrolabe voluntarily dismissed the lawsuit, and the Electronic Frontier Foundation was involved in the resolution. Following this, ICANN took over the responsibility for maintaining the database in October 2011.

Frequently Asked Questions

What is the difference between a timezone and a UTC offset?

A UTC offset is a simple numerical difference from Coordinated Universal Time. A timezone, as defined by the tz database, is a geographic region that follows specific rules, which may include multiple different offsets due to daylight saving time changes.

Why does the database use underscores in names like America/New_York?

The database follows POSIX-style naming conventions, which require the use of valid file name components. Since spaces are not permitted in these identifiers, underscores are used to replace them.

Is the tz database accurate for dates before 1970?

The database aims to be accurate for the specific city used to identify a region, but it does not guarantee that the rules were consistent across the entire geographic region prior to 1970.

How often is the tz database updated?

There is no fixed schedule for releases, but new editions are typically published several times per year as changes to time zone rules or daylight saving laws warrant.

Who maintains the tz database today?

The database is maintained with the organizational backing of ICANN, with Paul Eggert serving as the editor and maintainer.