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.
tz
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 (known as tz, tzdb, or zoneinfo) is used by several implementations, including the GNU C Library (used in GNU/Linux), Android, FreeBSD, NetBSD, OpenBSD, ChromiumOS, Cygwin, MariaDB, MINIX, musl libc, MySQL, webOS, AIX, iOS, macOS, Microsoft Windows, OpenVMS, Oracle Database, and Oracle Solaris.
tzdb
zoneinfo
Each main entry in the database represents a timezone for a set of civil-time clocks that have all agreed since 1970. Timezones are typically identified by continent or ocean and then by the name of the largest city within the region containing the clocks. 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 a POSIX.1-2024 implementation set the TZ environment variable to the location's full name, e.g., TZ="America/New_York".
America/New_York
America/Phoenix
America/Detroit
TZ
TZ="America/New_York"
Associated with each timezone is a history of offsets from Universal Time (UT), which is Greenwich Mean Time (GMT) with days beginning at midnight; for timestamps 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.
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 2022a, each release has been distributed in POSIX ustar interchange format, compressed as described above; older releases use a nearly compatible format. Since version 2016h, each release has contained a text file named "version" whose first (and currently only) line is the version. Older releases are archived, and are also available in an FTP directory via a less secure protocol.
tzcodeV.tar.gz
tzdataV.tar.gz
tzdb-V.tar.lz
V
version
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. The binary files are in a special format specified by The Time Zone Information Format (TZif) (Internet RFC 9636). The code also lets you read a TZif file and interpret timestamps for that location.
README
The tz code and data are by no means authoritative. If you find errors, please email changes to tz@iana.org, the time zone mailing list. See the mailing list's main page to subscribe or to browse its archive of old messages. Metadata for mailing list discussions and corresponding data changes can be generated automatically.
tz@iana.org
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, Android, ICU, IBM JDK, Joda-Time, MySQL, Noda Time, and OpenJDK/Oracle JDK.
tz README
Since version 2013a, sources for the tz database have been 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. A0 TimeZone Migration displays changes between recent tzdb versions.
As discussed in "How Time Zones Are Coordinated", the time zone database relies on collaboration among governments, the time zone database volunteer community, and data distributors downstream.
If your government plans to change its time zone boundaries or daylight saving rules, please send email to tz@iana.org well in advance, as this will lessen confusion and will coordinate updates to many cell phones, computers, and other devices around the world. In your email, please cite the legislation or regulation that specifies the change, so that it can be checked for details such as the exact times when clock transitions occur. It is OK if a rule change is planned to affect clocks far into the future, as a long-planned change can easily be reverted or otherwise altered with a year's notice before the change would have affected clocks.
There is no fixed schedule for tzdb releases. However, typically a release occurs every few months. Many downstream timezone data distributors wait for a tzdb release before they produce an update to time zone behavior in consumer devices and software products. After a release, various parties must integrate, test, and roll out an update before end users see changes. These updates can be expensive, for both the quality assurance process and the overall cost of shipping and installing updates to each device's copy of tzdb. Updates may be batched with other updates and may take substantial time to reach end users after a release. Older devices may no longer be supported and thus may never be updated, which means they will continue to use out-of-date rules.
For these reasons any rule change should be promulgated at least a year before it affects how clocks operate; otherwise, there is a good chance that many clocks will be wrong due to delays in propagating updates, and that residents will be confused or even actively resist the change. The shorter the notice, the more likely clock problems will arise; see "On the Timing of Time Zone Changes" for examples.
These are listed roughly in ascending order of complexity and fanciness.
Although some of these do not fully support tz data, in recent tzdb distributions you can generally work around compatibility problems by running the command make rearguard_tarballs and compiling from the resulting tarballs instead.
make rearguard_tarballs
parse_olson
tests_from_zdump
std::chrono
org.joda.time.tz.ZoneInfoCompiler
java.time
timeZone
Intl.DateTimeFormat
Intl
Temporal
Date
GTimeZone
baltzo::TimeZoneUtil
posix_tz_db
"Africa/Cairo"
"EET-2EEST,M4.5.5/0,M10.5.4/24"
zoneinfo.ZoneInfo
tzdata
DateTimeFormatter
Calendar
System.TimeZoneInfo
tztab
Geographical boundaries between timezones are available from several Internet geolocation services and other sources.
Various sources argue for and against daylight saving time and time zone shifts, and many scientific studies have been conducted. This section summarizes reviews and position statements based on scientific literature in the area.
right
time_t
posix
leap-seconds.list
ntpd
leapseconds
right/UTC
chrony
[Asia/Tokyo]
TZ="JST-9"
TZ="HST10"
TZ="Asia/Tokyo"
TZ="Pacific/Honolulu"
"GMT-9"