Please send corrections to this web page to the time zone mailing list.
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 UTC offsets and daylight-saving rules.
This database (often called tz
or zoneinfo
)
is used by several implementations,
including
the GNU C Library used in
GNU/Linux,
FreeBSD,
NetBSD,
OpenBSD,
Cygwin,
DJGPP,
HP-UX,
IRIX,
Mac OS X,
OpenVMS,
Solaris,
Tru64, and
UnixWare.
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.
For example, America/New_York
represents most of the US eastern time zone;
America/Indianapolis
represents most of Indiana, which
uses eastern 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,
Kentucky, which switched from central to eastern time in 1991.
To use the database, set the TZ
environment variable to
the location's full name, e.g., TZ="America/New_York"
.
In the tz
database's
FTP distribution,
the code is in the file tzcodeC.tar.gz
,
where C
is the code's version;
similarly, the data are in tzdataD.tar.gz
,
where 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
location.
The data are by no means authoritative. If you find errors, please send changes to the time zone mailing list. You can also subscribe to the mailing list, retrieve the archive of old messages (in gzip compressed format), or retrieve archived older versions of code and data.
The Web has several other sources for time zone and daylight saving time data. Here are some recent links that may be of interest.
tz
databasetz
's.tz
. An earlier schema was sketched out by Tim Berners-Lee.tz
compilerstz
source into iCalendar-compatible VTIMEZONE files.
Vzic is freely
available under the GNU
General Public License (GPL).parse_olson
that compiles
tz
source 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_zdump
that generates test cases for each clock
transition in the tz
database.org.joda.time.tz.ZoneInfoCompiler
that compiles
tz
source into a Joda-specific binary format. Joda Time
is freely available under a BSD-style license.tz
binary file readerstz
binary file reader.
This library is freely available under the
GNU Lesser General Public License (LGPL),
and is widely used in GNU/Linux systems.tz
binary file reader written in Java.
It is freely available under the GNU LGPL.tz
binary file reader written in Python. It is freely available
under a BSD-style license.tz
-based time zone conversion softwareusno*
files in the tz
distribution.tz
database contains English abbreviations for all time
stamps but in many cases these are merely inventions of the database
maintainers.