Please send corrections to this web page to the time zone mailing list.
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, UTC offsets, and
This database (often called
is used by several implementations,
C Library used in
Mac OS X,
Each location in the database represents a national 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.
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.,
the code is in the file
C is the code's version;
similarly, the data are in
D is the data's version.
The following shell commands download
these files to a GNU/Linux or similar host;
see the downloaded
README file for what to do next.
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz' gzip -dc tzcode*.tar.gz | tar -xf - gzip -dc tzdata*.tar.gz | tar -xf -
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
The 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, retrieve the full archive of old messages (in gzip compressed format), or retrieve archived older versions of code and data; there is also a smaller HTTP mirror.
The Web has several other sources for time zone and daylight saving time data. Here are some recent links that may be of interest.
These are listed roughly in ascending order of complexity and fanciness.
tzzone, along with a polygonal representation of the geographical area corresponding to the zone.
tz. An earlier schema was sketched out.
tzsource into iCalendar-compatible VTIMEZONE files. Vzic is freely available under the GNU General Public License (GPL).
tzsource into Perl modules. It is part of the Perl DateTime Project, which is freely available under both the GPL and the Perl Artistic License. DateTime::TimeZone also contains a script
tests_from_zdumpthat generates test cases for each clock transition in the
tzsource into an ICU-specific format. ICU is freely available under a BSD-style license.
tzsource into a Joda-specific binary format. Joda Time is freely available under a BSD-style license.
tzsource into Python. It is freely available under a BSD-style license.
tzsource into Ruby. It is freely available under the MIT license.
tzsource into a time zone repository whose format is either proprietary or an XML-encoded representation.
tzbinary file readers
tzbinary file reader. This library is freely available under the GNU Lesser General Public License (LGPL), and is widely used in GNU/Linux systems.
tzbinary file reader written in Java. It is freely available under the LGPL.
tzbinary file reader.
tz-based time zone software
tzdatabase, accessed via a C# library. As its name suggests, it is in the public domain. Only current time stamps are well supported; historical data are compiled into the runtime but are not easily accessible.
tzdatabase in a Java-specific format.
usno*files in the
TZvalues using the Windows → Tzid table maintained by the CLDR data mentioned below.
tzregions in the US.
tz-related zone subdivision data.
tzdatabase contains English abbreviations for all time stamps but in many cases these are merely inventions of the database maintainers.
+09for Japan and
-10for Hawaii. However, the POSIX
TZenvironment variable uses the opposite convention. For example, one might use
TZ="HST10"for Japan and Hawaii, respectively. If the
tzdatabase is available, it is usually better to use settings like
TZ="Pacific/Honolulu"instead, as this should avoid confusion, handle old time stamps better, and insulate you better from any future changes to the rules. One should never set POSIX
TZto a value like
"GMT-9", though, since this would falsely claim that local time is nine hours ahead of UTC and the time zone is called "GMT".