Sources for time zone and daylight saving time data

Time zone and daylight saving rules are controlled by individual governments. They are sometimes changed with little notice, and their histories and planned futures are often recorded only fitfully. Here is a summary of attempts to organize and record relevant data in this area.

The tz database

The public-domain time zone database contains code and data that represent the history of local time for many representative locations around the globe. It is updated periodically to reflect changes made by political bodies to time zone boundaries and daylight-saving rules. This database (often called zoneinfo or tz) is used by several implementations, including the GNU C Library (used in GNU/Linux), Android, B2G OS, FreeBSD, NetBSD, OpenBSD, Chromium OS, Cygwin, DJGPP, MINIX, MySQL, webOS, AIX, BlackBerry 10, iOS, macOS, Microsoft Windows, OpenVMS, Oracle Database, and Oracle Solaris.

Each location in the database represents a region where all clocks keeping local time have agreed since 1970. Locations are identified by continent or ocean and then by the name of the location, which is typically the largest city within the region. For example, America/New_York represents most of the US eastern time zone; America/Phoenix represents most of Arizona, which uses mountain time without daylight saving time (DST); America/Detroit represents most of Michigan, which uses eastern time but with different DST rules in 1975; and other entries represent smaller regions like Starke County, Indiana, which switched from central to eastern time in 1991 and switched back in 2006. To use the database on an extended POSIX implementation set the TZ environment variable to the location's full name, e.g., TZ="America/New_York".

Associated with each region is a history of offsets from Universal Time (UT), which is Greenwich Mean Time (GMT) with days beginning at midnight; for time stamps after 1960 this is more precisely Coordinated Universal Time (UTC). The database also records when daylight saving time was in use, along with some time zone abbreviations such as EST for Eastern Standard Time in the US.

Downloading the tz database

The following shell commands download the latest release's two tarballs to a GNU/Linux or similar host.

mkdir tzdb
cd tzdb
wget https://www.iana.org/time-zones/repository/tzcode-latest.tar.gz
wget https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
gzip -dc tzcode-latest.tar.gz | tar -xf -
gzip -dc tzdata-latest.tar.gz | tar -xf -

Alternatively, the following shell commands download the same release in a single-tarball format containing extra data useful for regression testing:

wget https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz
lzip -dc tzdb-latest.tar.lz | tar -xf -

These commands use convenience links to the latest release of the tz database hosted by the Time Zone Database website of the Internet Assigned Numbers Authority (IANA). Older releases are in files named tzcodeV.tar.gz, tzdataV.tar.gz, and tzdb-V.tar.lz, where V is the version. Since 1996, each version has been a four-digit year followed by lower-case letter (a through z, then za through zz, then zza through zzz, and so on). Since version 2016h, each release has contained a text file named "version" whose first (and currently only) line is the version. The releases are also available in an FTP directory via a less-secure protocol .

Alternatively, a development repository of code and data can be retrieved from GitHub via the shell command:

git clone https://github.com/eggert/tz

Since version 2012e, each release has been tagged in development repositories. Untagged commits are less well tested and probably contain more errors.

After obtaining the code and data files, see the README file for what to do next. The code lets you compile the tz source files into machine-readable binary files, one for each location. It also lets you read a tz binary file and interpret time stamps for that location.

Changes to the tz database

The tz code and data are by no means authoritative. If you find errors, please send changes to tz@iana.org, the time zone mailing list. You can also subscribe to it and browse the archive of old messages.

If your government plans to change its time zone boundaries or daylight saving rules, inform tz@iana.org well in advance, as this will coordinate updates to many cell phones, computers, and other devices around the world. With less than a year's notice there is a good chance that some computer-based clocks will operate incorrectly after the change, due to delays in propagating updates to software and data. The shorter the notice, the more likely clock problems will arise; see "On the Timing of Time Zone Changes" for examples.

Changes to the tz code and data are often propagated to clients via operating system updates, so client tz data can often be corrected by applying these updates. With GNU/Linux and similar systems, if your maintenance provider has not yet adopted the latest tz data, you can often short-circuit the process by tailoring the generic instructions in the tz README file and installing the latest data yourself. System-specific instructions for installing the latest tz data have also been published for AIX, ICU, IBM and Oracle Java, Joda-Time, MySQL, and Noda Time (see below).

Sources for the tz database are UTF-8 text files with lines terminated by LF, which can be modified by common text editors such as GNU Emacs, gedit, and vim. Specialized source-file editing can be done via the Sublime zoneinfo package for Sublime Text and the VSCode zoneinfo extension for Visual Studio Code.

For further information about updates, please see Procedures for Maintaining the Time Zone Database (Internet RFC 6557). More detail can be found in Theory and pragmatics of the tz code and data.

Commentary on the tz database

Web sites using recent versions of the tz database

These are listed roughly in ascending order of complexity and fanciness.

Network protocols for tz data

Other tz compilers

Other tz binary file readers

Other tz-based time zone software

Other time zone databases

Maps

Time zone boundaries

Geographical boundaries between time zone regions are available from several geolocation services and other sources.

Civil time concepts and history

National histories of legal time

Australia
The Parliamentary Library has commissioned a research paper on daylight saving time in Australia. The Bureau of Meteorology publishes a list of Implementation Dates of Daylight Savings Time within Australia. "History of daylight saving time in Queensland" appeared in the Queensland History Journal.
Belgium
The Royal Observatory of Belgium maintains a table of time in Belgium (in Dutch).
Brazil
The Time Service Department of the National Observatory records Brazil's daylight saving time decrees (in Portuguese).
Canada
National Research Council Canada publishes current and some older information about time zones & daylight saving time.
Chile
The Hydrographic and Oceanographic Service of the Chilean Navy publishes a history of Chile's official time (in Spanish).
Germany
The National Institute for Science and Technology maintains the Realisation of Legal Time in Germany.
Israel
The Interior Ministry periodically issues announcements (in Hebrew).
Italy
The National Institute of Metrological Research maintains a table of civil time (in Italian).
Mexico
The Investigation and Analysis Service of the Mexican Library of Congress has published a history of Mexican local time (in Spanish).
Malaysia
See Singapore below.
Netherlands
Legal time in the Netherlands (in Dutch) covers the history of local time in the Netherlands from ancient times.
New Zealand
The Department of Internal Affairs maintains a brief History of Daylight Saving. The privately-maintained History of New Zealand time has more details.
Singapore
Why is Singapore in the "Wrong" Time Zone? details the history of legal time in Singapore and Malaysia.
United Kingdom
History of legal time in Britain discusses in detail the country with perhaps the best-documented history of clock adjustments. The National Physical Laboratory also maintains an Archive of Summer time dates.
United States
The Department of Transportation's Recent Time Zone Proceedings lists changes to time zone boundaries.

Precision timekeeping

Time notation

See also


This web page is in the public domain, so clarified as of 2009-05-17 by Arthur David Olson.
Please send corrections to this web page to the time zone mailing list.