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, Firefox OS, FreeBSD, NetBSD, OpenBSD, Cygwin, DJGPP, MINIX, webOS, AIX, BlackBerry 10, iOS, Microsoft Windows, OpenVMS, Oracle Database, Oracle Solaris, and OS X.

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 alphabetic time zone abbreviations such as EST for Eastern Standard Time in the US.

In the tz database's FTP releases the code is in the file tzcodeC.tar.gz, where C is the code's version; similarly, the data entries are in tzdataD.tar.gz, where D is the data's 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). Convenience links to the latest code and latest data revisions are also available. The following shell commands download these files to a GNU/Linux or similar host; see the downloaded README file for what to do next.

mkdir tz
cd tz
wget --retr-symlinks '*-latest.tar.gz'
gzip -dc tzcode-latest.tar.gz | tar -xf -
gzip -dc tzdata-latest.tar.gz | tar -xf -

The code and data files can also be obtained from the Time Zone Database website of the Internet Assigned Numbers Authority (IANA). An unofficial development repository of the code and data is available in Git form from GitHub; be careful, as this repository is less well tested and probably contains more errors.

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 the time zone mailing list. You can also browse recent messages sent to the mailing list, subscribe to it, and browse the archive of old messages.

If your government plans to change its time zone boundaries or daylight saving rules, let the mailing list know well in advance. 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.

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. One editor has a package to simplify editing further:

For further information about updates, please see Procedures for Maintaining the Time Zone Database (Internet RFC 6557).

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


Time zone boundaries

Civil time concepts and history

National histories of legal time

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.
The Royal Observatory of Belgium maintains a table of time in Belgium (in Dutch).
The Time Service Department of the National Observatory records Brazil's daylight saving time decrees (in Portuguese).
National Research Council Canada publishes current and some older information about time zones & daylight saving time.
The Hydrographic and Oceanographic Service of the Chilean Navy publishes a history of Chile's official time (in Spanish).
The National Institute for Science and Technology maintains the Realisation of Legal Time in Germany.
The Interior Ministry periodically issues announcements (in Hebrew).
The Investigation and Analysis Service of the Mexican Library of Congress has published a history of Mexican local time (in Spanish).
See Singapore below.
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.
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.