Sources for Time Zone and Daylight Saving Time Data
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
This database (often called
is used by several implementations,
C Library (used in
Oracle Solaris, and
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.
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
environment variable to the location's full name,
Associated with each region is a history of offsets from
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.
the code is in the file
C is the code's version;
similarly, the data entries are in
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
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.
wget --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-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
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
The files 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. For further information about updates, please see
Maintaining the Time Zone Database (Internet RFC 6557).
The Web has several other sources for time zone and daylight saving time data.
Here are some links that may be of interest.
Commentary on the
Web sites using recent versions of the
These are listed roughly in ascending order of complexity and fanciness.
Network protocols for
- Vzic is a C
program that compiles
tz source into iCalendar-compatible VTIMEZONE files.
Vzic is freely
available under the GNU
General Public License (GPL).
- tziCal – tz
database conversion utility is like Vzic, except for the .NET framework
and with a BSD-style license.
contains a script
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
- International Components for
Unicode (ICU) contains C/C++ and Java
libraries for internationalization that
has a compiler from
and from CLDR data
into an ICU-specific format.
ICU is freely available under a
- The TZUpdater
tz source into the format used by
- Joda-Time – Java date
and time API
contains a class
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.
- Noda Time – Date and time API for
.NET and TZ4Net
are similar to Joda Time, but for the .NET framework instead of
Java. They are freely available under the
and a BSD-style license, respectively.
compilers and libraries include:
- Moment Timezone is a
plugin for the Moment.js date
manipulation library. It is freely available under
Dates. It is freely available under the Apache License.
translates UT to local time. It is freely available under
the MIT license.
- pytz – World Timezone
Definitions for Python compiles
tz source into
It is freely available under a BSD-style license.
- TZInfo –
Ruby Timezone Library
tz source into
It is freely available under the MIT license.
- The Chronos Date/Time
a Smalltalk class
library that compiles
tz source into a time
zone repository whose format
is either proprietary or an XML-encoded
contains a developer-oriented parser that compiles
source into text files, along with a runtime that can read those
files. Tcl is freely available under a BSD-style
tz binary file readers
- The GNU C
has an independent, thread-safe implementation of
tz binary file reader.
This library is freely available under the
GNU Lesser General Public License
and is widely used in GNU/Linux systems.
- GNOME's Glib has
tz binary file reader written in C that
GTimeZone object representing sets
of UT offsets.
It is freely available under the LGPL.
tz binary file reader written in Java.
It is freely available under the LGPL.
- Timezone is a
aware. It is freely available under the MIT license.
- Tcl, mentioned above, also contains a
tz binary file reader.
tz binary file reader written in Perl.
It is freely available under the same terms as Perl
(dual GPL and Artistic license).
library contains a Python tool that
tz binary data into
JSON-format data suitable for use
are not supported.
- The timezone-olson
package contains Haskell code that
parses and uses
tz binary data. It is freely
available under a BSD-style license.
tz-based time zone software
Other time zone databases
- Atlas Query
is Astrodienst's Web version of Shanks and Pottenger's
time zone history atlases published in both computer
and book form (one volume
for the US, and one for
other locations) by Astro Computing Services.
These atlases are extensive but unreliable, as Shanks appears to have
guessed many UT offsets and transitions. The atlases cite no
sources and do not indicate which entries are guesswork.
- HP-UX has a database in
- Microsoft Windows has proprietary data mentioned above.
- World Time Server
is another time zone database.
- World Time Zones
contains data from the Time Service Department of the
US Naval Observatory.
- The Standard
Schedules Information Manual of the
International Air Transport Association
gives current time zone rules for airports served by commercial aviation.
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
- 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
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.
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.
Science of Timekeeping is a thorough introduction
to the theory and practice of precision timekeeping.
- NTP: The Network
discusses how to synchronize clocks of
- The Precision
Time Protocol (IEEE 1588)
can achieve submicrosecond clock accuracy on a local area network.
Options for DHCP
(Internet RFC 4833)
specifies a DHCP
option for a server to configure
a client's time zone and daylight saving settings automatically.
- A Few Facts
Concerning GMT, UT, and
answers questions like "What is the
difference between GMT and UTC?"
Times explains more abstruse astronomical time scales like
Scales goes into more detail, particularly for historical variants.
- The IAU's SOFA
collection contains C and Fortran
code for converting among time scales like
TDB, TDT and
- Basics of
Space Flight – Reference Systems – Time Conventions
briefly explains interplanetary space flight timekeeping.
Notes on Mars Solar Time as Adopted by the Mars24 Sunclock briefly
describes Mars Coordinated Time (MTC) and the
diverse local time
scales used by each landed mission on Mars.
- LeapSecond.com is
dedicated not only to leap seconds but to precise time and frequency
in general. It covers the state of the art in amateur timekeeping, and
how the art has progressed over the past few decades.
Bulletins contains official publications of the International
Earth Rotation and Reference Systems Service, which decides
when leap seconds occur.
- The Leap
Second Discussion List covers McCarthy
and Klepczynski's proposal to discontinue leap seconds,
discussed further in
leap second: its history and possible future.
might be redefined
without Leap Seconds gives pointers on this
- The Unicode Common Locale Data
Repository (CLDR) Project has localizations for time
zone names, abbreviations, identifiers, and formats. For example, it
contains French translations for "Eastern European Summer Time",
charts show these values for many locales. Data values are available in
(an XML format) and JSON.
A summary of
the international standard date and time notation is a good
8601:2004 – Data elements and interchange formats – Information
interchange – Representation of dates and times.
Schema: Datatypes – dateTime specifies a format inspired by
ISO 8601 that is in common use in XML data.
Message Format (Internet RFC 5322) §3.3
specifies the time notation used in email and HTTP
Date and Time
on the Internet: Timestamps (Internet RFC 3339)
specifies an ISO 8601
profile for use in new Internet
Date & Time
Formats on the Web surveys web- and Internet-oriented date and time
Best of Dates, the Worst of Dates covers many problems encountered
by software developers when handling dates and time stamps.
- Alphabetic time zone abbreviations should not be used as unique
identifiers for UTC offsets as they are ambiguous in
practice. For example, in English-speaking North America
"CST" denotes 6 hours behind UTC,
but in China it denotes 8 hours ahead of UTC,
and French-speaking North Americans prefer
"CST". For POSIX the
database contains English abbreviations for all time stamps but in
many cases these are merely inventions of the database
- Numeric time zone abbreviations typically count hours east of
UTC, e.g., +09 for Japan and
−10 for Hawaii. However, the POSIX
TZ environment variable uses the opposite convention.
For example, one might use
for Japan and Hawaii, respectively. If the
tz database is available, it is usually better to use
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
TZ to 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".
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.