diff options
| author | Philip Paeps <philip@FreeBSD.org> | 2022-08-16 08:09:47 +0000 |
|---|---|---|
| committer | Philip Paeps <philip@FreeBSD.org> | 2022-08-16 08:09:47 +0000 |
| commit | a24d752d3e77a28c877a5319face8d00aa1b558c (patch) | |
| tree | 5ae147d3bedd850833ec5c783ea54fa4b00e6aba /tz-link.html | |
| parent | 9b5369d383baf54651be0922591eeb6263ce029d (diff) | |
Import tzcode 2022cvendor/tzcode/tzcode2022c
Diffstat (limited to 'tz-link.html')
| -rw-r--r-- | tz-link.html | 1175 |
1 files changed, 1175 insertions, 0 deletions
diff --git a/tz-link.html b/tz-link.html new file mode 100644 index 000000000000..d3b37664c71c --- /dev/null +++ b/tz-link.html @@ -0,0 +1,1175 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<title>Time zone and daylight saving time data</title> +<meta charset="UTF-8"> +<style> +pre {margin-left: 2em; white-space: pre-wrap;} +</style> +</head> +<body> +<h1>Time zone and daylight saving time data</h1> +<p> +<a href="https://en.wikipedia.org/wiki/Time_zone">Time zone</a> and +<a href="https://en.wikipedia.org/wiki/Daylight_saving_time">daylight-saving</a> +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. +</p> + <h3>Outline</h3> + <nav> + <ul> + <li>The <code><abbr>tz</abbr></code> database product and process + <ul> + <li><a href="#tzdb">The <code><abbr>tz</abbr></code> database</a></li> + <li><a href="#download">Downloading the <code><abbr>tz</abbr></code> database</a></li> + <li><a href="#changes">Changes to the <code><abbr>tz</abbr></code> database</a></li> + <li><a href="#commentary">Commentary on the <code><abbr>tz</abbr></code> database</a></li> + </ul> + </li> + <li>Uses of the <code><abbr>tz</abbr></code> database + <ul> + <li><a href="#web">Web sites using recent versions of the <code><abbr>tz</abbr></code> database</a></li> + <li><a href="#protocols">Network protocols for <code><abbr>tz</abbr></code> data</a></li> + <li><a href="#compilers">Other <code><abbr>tz</abbr></code> compilers</a></li> + <li><a href="#TZif">Other <abbr>TZif</abbr> readers</a></li> + <li><a href="#software">Other <code><abbr>tz</abbr></code>-based time zone software</a></li> + </ul> + </li> + <li>Related data + <ul> + <li><a href="#other-dbs">Other time zone databases</a></li> + <li><a href="#maps">Maps</a></li> + <li><a href="#boundaries">Time zone boundaries</a></li> + </ul> + </li> + <li>Timekeeping concepts + <ul> + <li><a href="#civil">Civil time concepts and history</a></li> + <li><a href="#national">National histories of legal time</a></li> + <li><a href="#costs">Costs and benefits of time shifts</a></li> + <li><a href="#precision">Precision timekeeping</a></li> + <li><a href="#notation">Time notation</a></li> + </ul> + </li> + <li><a href="#see-also">See also</a></li> + </ul> + </nav> + +<section> +<h2 id="tzdb">The <code><abbr title="time zone">tz</abbr></code> database</h2> +<p> +The <a href="https://en.wikipedia.org/wiki/Public_domain">public-domain</a> +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 <code><abbr>tz</abbr></code>, +<code><abbr>tzdb</abbr></code>, or <code>zoneinfo</code>) +is used by several implementations, +including +<a href="https://www.gnu.org/software/libc/">the +<abbr title="GNU's Not Unix">GNU</abbr> +C Library</a> (used in +<a href="https://en.wikipedia.org/wiki/Linux"><abbr>GNU</abbr>/Linux</a>), +<a href="https://www.android.com">Android</a>, +<a href="https://www.freebsd.org">Free<abbr +title="Berkeley Software Distribution">BSD</abbr></a>, +<a href="https://netbsd.org">Net<abbr>BSD</abbr></a>, +<a href="https://www.openbsd.org">Open<abbr>BSD</abbr></a>, +<a href="https://www.chromium.org/chromium-os/">Chromium OS</a>, +<a href="https://cygwin.com">Cygwin</a>, +<a href="https://mariadb.org">MariaDB</a>, +<a href="https://en.wikipedia.org/wiki/MINIX">MINIX</a>, +<a href="https://www.mysql.com">MySQL</a>, +<a href="https://en.wikipedia.org/wiki/WebOS"><abbr +title="Web Operating System">webOS</abbr></a>, +<a href="https://en.wikipedia.org/wiki/IBM_AIX"><abbr +title="Advanced Interactive eXecutive">AIX</abbr></a>, +<a href="https://www.apple.com/ios"><abbr +title="iPhone OS">iOS</abbr></a>, +<a href="https://www.apple.com/macos">macOS</a>, +<a href="https://www.microsoft.com/en-us/windows">Microsoft Windows</a>, +<a href="https://www.vmssoftware.com">Open<abbr +title="Virtual Memory System">VMS</abbr></a>, +<a href="https://www.oracle.com/database/">Oracle Database</a>, and +<a href="https://www.oracle.com/solaris">Oracle Solaris</a>.</p> +<p> +Each main entry in the database represents a <dfn>timezone</dfn> +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, <code>America/New_York</code> +represents most of the <abbr title="United States">US</abbr> eastern time zone; +<code>America/Phoenix</code> represents most of Arizona, which +uses mountain time without daylight saving time (<abbr>DST</abbr>); +<code>America/Detroit</code> represents most of Michigan, which uses +eastern time but with different <abbr>DST</abbr> 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 <a +href="https://en.wikipedia.org/wiki/POSIX"><abbr +title="Portable Operating System Interface">POSIX</abbr></a> +implementation set the <code><abbr>TZ</abbr></code> +environment variable to the location's full name, +e.g., <code><abbr>TZ</abbr>="America/New_York"</code>.</p> +<p> +Associated with each timezone is a history of offsets from +<a href="https://en.wikipedia.org/wiki/Universal_Time">Universal +Time</a> (<abbr>UT</abbr>), which is <a +href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">Greenwich Mean +Time</a> (<abbr>GMT</abbr>) with days beginning at midnight; +for timestamps after 1960 this is more precisely <a +href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">Coordinated +Universal Time</a> (<abbr>UTC</abbr>). +The database also records when daylight saving time was in use, +along with some time zone abbreviations such as <abbr>EST</abbr> +for Eastern Standard Time in the <abbr>US</abbr>.</p> +</section> + +<section> +<h2 id="download">Downloading the <code><abbr>tz</abbr></code> database</h2> +<p> +The following <a +href="https://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download +the latest release's two +<a href="https://en.wikipedia.org/wiki/Tar_(computing)">tarballs</a> +to a <abbr>GNU</abbr>/Linux or similar host.</p> +<pre><code>mkdir tzdb +cd tzdb +<a href="https://www.gnu.org/software/wget/">wget</a> https://www.iana.org/time-zones/repository/tzcode-latest.tar.gz +wget https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz +<a href="https://www.gnu.org/software/gzip/">gzip</a> -dc tzcode-latest.tar.gz | <a href="https://www.gnu.org/software/tar/">tar</a> -xf - +gzip -dc tzdata-latest.tar.gz | tar -xf - +</code></pre> +<p>Alternatively, the following shell commands download the same +release in a single-tarball format containing extra data +useful for regression testing:</p> +<pre><code>wget <a href="https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz">https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz</a> +<a href="https://www.nongnu.org/lzip/">lzip</a> -dc tzdb-latest.tar.lz | tar -xf - +</code></pre> +<p>These commands use convenience links to the latest release +of the <code><abbr>tz</abbr></code> database hosted by the +<a href="https://www.iana.org/time-zones">Time Zone Database website</a> +of the <a href="https://www.iana.org">Internet Assigned Numbers +Authority (IANA)</a>. +Older releases are in files named +<code>tzcode<var>V</var>.tar.gz</code>, +<code>tzdata<var>V</var>.tar.gz</code>, and +<code>tzdb-<var>V</var>.tar.lz</code>, +where <code><var>V</var></code> is the version. +Since 1996, each version has been a four-digit year followed by +lower-case letter (<samp>a</samp> through <samp>z</samp>, +then <samp>za</samp> through <samp>zz</samp>, then <samp>zza</samp> +through <samp>zzz</samp>, and so on). +Since version 2022a, each release has been distributed in +<a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06">POSIX +ustar interchange format</a>, compressed as described above; +older releases use a nearly-compatible format. +Since version 2016h, each release has contained a text file named +"<samp>version</samp>" whose first (and currently only) line is the version. +Older releases are <a href="https://ftp.iana.org/tz/releases/">archived</a>, +and are also available in an +<a href="ftp://ftp.iana.org/tz/releases/"><abbr +title="File Transfer Protocol">FTP</abbr> directory</a> via a +less-secure protocol.</p> +<p>Alternatively, a development repository of code and data can be +retrieved from <a href="https://github.com">GitHub</a> via the shell +command:</p> +<pre><code><a href="https://git-scm.com">git</a> clone <a href="https://github.com/eggert/tz">https://github.com/eggert/tz</a> +</code></pre> +<p> +Since version 2012e, each release has been tagged in development repositories. +Untagged commits are less well tested and probably contain +more errors.</p> +<p> +After obtaining the code and data files, see the +<code>README</code> file for what to do next. +The code lets you compile the <code><abbr>tz</abbr></code> source files into +machine-readable binary files, one for each location. The binary files +are in a special timezone information format (<dfn><abbr>TZif</abbr></dfn>) +specified by <a href="https://datatracker.ietf.org/doc/html/8536">Internet +<abbr>RFC</abbr> 8536</a>. +The code also lets +you read a <abbr>TZif</abbr> file and interpret timestamps for that +location.</p> +</section> + +<section> +<h2 id="changes">Changes to the <code><abbr>tz</abbr></code> database</h2> +<p> +The <code><abbr>tz</abbr></code> code and data +are by no means authoritative. If you find errors, please +send changes to <a href="mailto:tz@iana.org"><code>tz@iana.org</code></a>, +the time zone mailing list. You can also <a +href="https://mm.icann.org/mailman/listinfo/tz">subscribe</a> to it +and browse the <a +href="https://mm.icann.org/pipermail/tz/">archive of old +messages</a>. +<a href="https://tzdata-meta.timtimeonline.com/">Metadata for mailing list +discussions</a> and corresponding data changes can be +generated <a href="https://github.com/timparenti/tzdata-meta">automatically</a>. +</p> +<p> +If your government plans to change its time zone boundaries or +daylight saving rules, inform <code>tz@iana.org</code> well in +advance, as this will coordinate updates to many cell phones, +computers, and other devices around the world. +The change should be officially announced at least a year before it affects +how clocks operate; otherwise, there is a good chance that some +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; see "<a +href="https://codeofmatt.com/2016/04/23/on-the-timing-of-time-zone-changes/">On +the Timing of Time Zone Changes</a>" for examples. +The <code><abbr>tz</abbr></code> data can represent planned changes +far into the future, and a long-planned change can easily be reverted +or otherwise altered with a year's notice before the change would have +affected clocks. +</p> +<p> +Changes to the <code><abbr>tz</abbr></code> code and data are often +propagated to clients via operating system updates, so +client <code><abbr>tz</abbr></code> 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 <code><abbr>tz</abbr></code> data, you can often short-circuit +the process by tailoring the generic instructions in +the <code><abbr>tz</abbr> README</code> file and installing the latest +data yourself. System-specific instructions for installing the +latest <code><abbr>tz</abbr></code> data have also been published +for <a href="https://developer.ibm.com/articles/au-aix-olson-time-zone/"><abbr>AIX</abbr></a>, +<a +href="https://source.android.com/devices/tech/config/timezone-rules">Android</a>, +<a +href="https://unicode-org.github.io/icu/userguide/datetime/timezone/"><abbr +title="International Components for Unicode">ICU</abbr></a>, +<a href="https://www.ibm.com/support/pages/java-sdk-time-zone-update-utility"><abbr>IBM</abbr> +JDK</a>, +<a href="https://www.joda.org/joda-time/tz_update.html">Joda-Time</a>, <a +href="https://dev.mysql.com/doc/refman/en/time-zone-support.html">MySQL</a>, +<a href="https://nodatime.org/userguide/tzdb">Noda Time</a>, and <a +href="https://www.oracle.com/java/technologies/javase/tzupdater-readme.html">OpenJDK/Oracle JDK</a>. +</p> +<p>Since version 2013a, +sources for the <code><abbr>tz</abbr></code> database have been +<a href="https://en.wikipedia.org/wiki/UTF-8"><abbr +title="Unicode Transformation Format 8-bit">UTF-8</abbr></a> +<a href="https://en.wikipedia.org/wiki/Text_file">text files</a> +with lines terminated by <a href="https://en.wikipedia.org/wiki/Newline"><abbr +title="linefeed">LF</abbr></a>, +which can be modified by common text editors such +as <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, +<a href="https://wiki.gnome.org/Apps/Gedit">gedit</a>, and +<a href="https://www.vim.org">vim</a>. +Specialized source-file editing can be done via the +<a href="https://packagecontrol.io/packages/zoneinfo">Sublime +zoneinfo</a> package for <a +href="https://www.sublimetext.com">Sublime Text</a> and the <a +href="https://marketplace.visualstudio.com/items?itemName=gilmoreorless.vscode-zoneinfo">VSCode +zoneinfo</a> extension for <a href="https://code.visualstudio.com">Visual +Studio Code</a>. +</p> +<p> +For further information about updates, please see +<a href="https://datatracker.ietf.org/doc/html/rfc6557">Procedures for +Maintaining the Time Zone Database</a> (Internet <abbr +title="Request For Comments">RFC</abbr> 6557). More detail can be +found in <a href="theory.html">Theory and pragmatics of the +<code><abbr>tz</abbr></code> code and data</a>. +<a href="https://a0.github.io/a0-tzmigration/">A0 TimeZone Migration</a> +displays changes between recent <code><abbr>tzdb</abbr></code> versions. +</p> +</section> + +<section> +<h2 id="commentary">Commentary on the <code><abbr>tz</abbr></code> database</h2> +<ul> +<li>The article +<a href="https://en.wikipedia.org/wiki/Tz_database">tz database</a> is +an encyclopedic summary.</li> +<li><a href="tz-how-to.html">How to Read the +tz Database Source Files</a> explains the <code><abbr>tz</abbr></code> +database format.</li> +<li><a +href="https://blog.jonudell.net/2009/10/23/a-literary-appreciation-of-the-olsonzoneinfotz-database/">A +literary appreciation of the Olson/Zoneinfo/tz database</a> comments on the +database's style.</li> +<li><a href="https://doi.org/10.1145/3340301.3341125">What time is it: +managing time in the internet</a> analyzes the database longitudinally.</li> +</ul> +</section> + +<section> +<h2 id="web">Web sites using recent versions of the +<code><abbr>tz</abbr></code> database</h2> +<p> +These are listed roughly in ascending order of complexity and fanciness. +</p> +<ul> +<li><a href="https://time.is">Time.is</a> shows locations' +time and zones.</li> +<li><a href="https://www.timejones.com">TimeJones.com</a>, +<a href="https://timezoneconverterapp.com">Time Zone Converter</a> and +<a href="https://www.worldclock.com">The World Clock</a> +are time zone converters.</li> +<li><a href="https://timezonedb.com/download">TimeZoneDB Database</a> +publishes <code><abbr>tzdb</abbr></code>-derived data in +<a href="https://en.wikipedia.org/wiki/Comma-separated_values"><abbr +title="comma-separated values">CSV</abbr></a> and +in <a href="https://en.wikipedia.org/wiki/SQL"><abbr +title="Structured Query Language">SQL</abbr></a> form.</li> +<li><a +href="https://twiki.org/cgi-bin/xtra/tzdatepick.html">Date and Time Gateway</a> +lets you see the <code><abbr>TZ</abbr></code> values directly.</li> +<li><a +href="https://www.convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current +Time in 1000 Places</a> uses descriptions of the values.</li> +<li><a href="https://home.kpn.nl/vanadovv/time/TZworld.html">Complete +timezone information for all countries</a> +displays tables of <abbr>DST</abbr> rules. +<li><a href="https://www.timeanddate.com/worldclock/">The World Clock – +Worldwide</a> lets you sort zone names and convert times.</li> +<li><a href="https://24timezones.com">24TimeZones</a> has a world +time map and a time converter.</li> +<li><a href="https://www.zeitverschiebung.net/en/">Time Difference</a> +calculates the current time difference between locations.</li> +<li><a href="https://www.wx-now.com">Weather Now</a> and +<a href="https://www.thetimenow.com">The Time Now</a> list the weather too.</li> +</ul> +</section> + +<section> +<h2 id="protocols">Network protocols for <code><abbr>tz</abbr></code> data</h2> +<ul> +<li>The <a href="https://www.ietf.org">Internet Engineering Task Force</a>'s +<a href="https://datatracker.ietf.org/wg/tzdist/charter/">Time Zone Data +Distribution Service (tzdist) working group</a> defined <a +href="https://datatracker.ietf.org/doc/html/rfc7808">TZDIST</a> +(Internet <abbr>RFC</abbr> 7808), a time zone data distribution service, +along with <a href="https://datatracker.ietf.org/doc/html/rfc7809">CalDAV</a> +(Internet <abbr>RFC</abbr> 7809), a calendar access protocol for +transferring time zone data by reference. +<a href="https://devguide.calconnect.org/Time-Zones/TZDS/">TZDIST +implementations</a> are available. +The <a href="https://www.ietf.org/mailman/listinfo/tzdist-bis">tzdist-bis +mailing list</a> discusses possible extensions.</li> +<li>The <a href="https://datatracker.ietf.org/doc/html/rfc5545"> +Internet Calendaring and Scheduling Core Object Specification +(iCalendar)</a> (Internet <abbr>RFC</abbr> 5445) +covers time zone +data; see its VTIMEZONE calendar component. +The iCalendar format requires specialized parsers and generators; a +variant <a href="https://datatracker.ietf.org/doc/html/rfc6321">xCal</a> +(Internet <abbr>RFC</abbr> 6321) uses +<a href="https://www.w3.org/XML/"><abbr +title="Extensible Markup Language">XML</abbr></a> format, and a variant +<a href="https://datatracker.ietf.org/doc/html/rfc7265">jCal</a> +(Internet <abbr>RFC</abbr> 7265) +uses <a href="https://www.json.org"><abbr +title="JavaScript Object Notation">JSON</abbr></a> format.</li> +</ul> +</section> + +<section> +<h2 id="compilers">Other <code><abbr>tz</abbr></code> compilers</h2> +<p>Although some of these do not fully support +<code><abbr>tz</abbr></code> data, in recent <code><abbr>tzdb</abbr></code> +distributions you can generally work around compatibility problems by +running the command <code>make rearguard_tarballs</code> and compiling +from the resulting tarballs instead.</p> +<ul> +<li><a href="https://sourceforge.net/projects/vzic/">Vzic</a> is a <a +href="https://en.wikipedia.org/wiki/C_%28programming_language%29">C</a> +program that compiles +<code><abbr>tz</abbr></code> source into iCalendar-compatible VTIMEZONE files. +Vzic is freely +available under the <a +href="https://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr> +General Public License (<abbr +title="General Public License">GPL</abbr>)</a>.</li> +<li><a href="https://sourceforge.net/projects/tzical/">tziCal – tz +database conversion utility</a> is like Vzic, except for the <a +href="https://dotnet.microsoft.com">.NET framework</a> +and with a <abbr>BSD</abbr>-style license.</li> +<li><a +href="https://metacpan.org/release/DateTime-TimeZone">DateTime::TimeZone</a> +contains a script <code>parse_olson</code> that compiles +<code><abbr>tz</abbr></code> source into <a href="https://www.perl.org">Perl</a> +modules. It is part of the Perl <a +href="https://github.com/houseabsolute/DateTime.pm/wiki">DateTime Project</a>, +which is freely +available under both the <abbr>GPL</abbr> and the Perl Artistic +License. DateTime::TimeZone also contains a script +<code>tests_from_zdump</code> that generates test cases for each clock +transition in the <code><abbr>tz</abbr></code> database.</li> +<li>The <a href="https://howardhinnant.github.io/date/tz.html">Time Zone +Database Parser</a> is a +<a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> parser and +runtime library with <a +href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0355r7.html">API</a> +adopted by +<a href="https://en.wikipedia.org/wiki/C++20">C++20</a>, +the current iteration of the C++ standard. +It is freely available under the +<abbr title="Massachusetts Institute of Technology">MIT</abbr> license.</li> +<li><a id="ICU" href="https://icu.unicode.org">International Components for +Unicode (<abbr>ICU</abbr>)</a> contains C/C++ and <a +href="https://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a> +libraries for internationalization that +has a compiler from <code><abbr>tz</abbr></code> source +and from <abbr title="Common Locale Data Repository">CLDR</abbr> data +(mentioned <a href="#CLDR">below</a>) +into an <abbr>ICU</abbr>-specific format. +<abbr>ICU</abbr> is freely available under a +<abbr>BSD</abbr>-style license.</li> +<li>The <a href="https://github.com/lau/tzdata">Tzdata</a> package for +the <a href="https://elixir-lang.org">Elixir</a> language downloads +and compiles <code><abbr>tz</abbr></code> source and exposes <abbr +title="Application Program Interface">API</abbr>s for use. It is +freely available under the <abbr>MIT</abbr> license.</li> +<li>Java-based compilers and libraries include: +<ul> +<li>The <a +href="https://www.oracle.com/java/technologies/javase/tzupdater-readme.html">TZUpdater +tool</a> compiles <code><abbr>tz</abbr></code> source into the format used by +<a href="https://openjdk.java.net/">OpenJDK</a> and +<a href="https://jdk.java.net/">Oracle JDK</a>. +Although its source code is proprietary, its executable is available under the +<a href="https://www.oracle.com/a/tech/docs/tzupdater-lic.html">Java SE +Timezone Updater License Agreement</a>.</li> +<li>The <a +href="https://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html">Java +SE 8 Date and Time</a> <abbr>API</abbr> can be supplemented by <a +href="https://www.threeten.org/threeten-extra/">ThreeTen-Extra</a>, +which is freely available under a <abbr>BSD</abbr>-style license.</li> +<li><a href="https://www.joda.org/joda-time/">Joda-Time – Java date +and time <abbr>API</abbr></a> contains a class +<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles +<code><abbr>tz</abbr></code> source into a binary format. It inspired +Java 8 <code>java.time</code>, which its users should migrate to once +they can assume Java 8 or later. It is available under the <a +href="https://www.apache.org/licenses/LICENSE-2.0">Apache License</a>.</li> +<li><a href="https://bell-sw.com/pages/iana-updater/">IANA Updater</a> and <a +href="https://www.azul.com/products/open-source-tools/ziupdater-time-zone-tool/">ZIUpdater</a> +are alternatives to TZUpdater. IANA Updater's license is unclear; +ZIUpdater is licensed under the <abbr>GPL</abbr>.</li> +<li><a href="https://github.com/MenoData/Time4A">Time4A: Advanced date and +time library for Android</a> and +<a href="https://github.com/MenoData/Time4J/">Time4J: Advanced date, +time and interval library for Java</a> compile +<code><abbr>tz</abbr></code> source into a binary format. +Time4A is available under the Apache License and Time4J is +available under the <a +href="https://www.gnu.org/copyleft/lesser.html"><abbr>GNU</abbr> Lesser +General Public License (<abbr title="Lesser General Public +License">LGPL</abbr>)</a>.</li> +<li><abbr>ICU</abbr> (mentioned <a href="#ICU">above</a>) contains compilers and +Java-based libraries.</li> +</ul> +<li><a href="https://nodatime.org">Noda Time – Date and +time <abbr>API</abbr> for .NET</a> +is like Joda-Time and Time4J, but for the .NET framework instead of Java. +It is freely available under the Apache License.</li> +<li>Many modern +<a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a> +runtimes support <code><abbr>tz</abbr></code> natively via the +<samp>timeZone</samp> option of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat"><samp>Intl.DateTimeFormat</samp></a>. +This can be used as-is or with most of the following libraries, +many of which also support runtimes lacking the <samp>timeZone</samp> option. +<ul> +<li>The <a +href="https://github.com/formatjs/date-time-format-timezone"><samp>Intl.DateTimeFormat</samp> +timezone polyfill</a> +is freely available under a <abbr>BSD</abbr>-style license.</li> +<li>The <a href="https://date-fns.org/">date-fns</a> +library manipulates timezone-aware timestamps in browsers and +in <a href="https://nodejs.org/en/">Node.js</a>. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li><a href="https://github.com/iamkun/dayjs">Day.js</a> is a +minimalist replacement for the date and time API of +the <a href="https://momentjs.com/docs/">now-legacy Moment.js</a> date +manipulation library. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li><a href="https://moment.github.io/luxon/">Luxon</a> improves +timezone support for the <samp>Intl</samp> API. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li><a href="https://momentjs.com/timezone/">Moment Timezone</a> is a +Moment.js plugin. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li><a href="https://github.com/bigeasy/timezone">Timezone</a> is a +JavaScript library that supports date arithmetic that is time zone +aware. It is freely available under the <abbr>MIT</abbr> license.</li> +<li><a href="https://www.npmjs.com/package/@tubular/time">@tubular/time</a> +supports live <code><abbr>tzdb</abbr></code> updates, +astronomical and atomic time, a command-line interface, +and full <a +href="https://en.wikipedia.org/wiki/TypeScript">TypeScript</a>. +Its companion <a +href="https://www.npmjs.com/package/@tubular/time-tzdb">@tubular/time-tzdb</a> +can generate <abbr>TZif</abbr> and other files, and a companion website +<a href="https://tzexplorer.org">Timezone Database Explorer</a> lets you +convert timestamps, view transition histories, and download code and data. +It is freely available under the <abbr>MIT</abbr> license.</li> +</ul> +The proposed <a +href="https://github.com/tc39/proposal-temporal"><samp>Temporal</samp> +objects</a> let programs access an abstract view of +<code><abbr>tzdb</abbr></code> data, and are designed to replace <a +href="https://codeofmatt.com/javascript-date-type-is-horribly-broken/">JavaScript's +problematic <samp>Date</samp> objects</a> when working with dates and times. +<li><a href="https://github.com/JuliaTime/">JuliaTime</a> contains a +compiler from <code><abbr>tz</abbr></code> source into +<a href="https://julialang.org/">Julia</a>. It is freely available +under the <abbr>MIT</abbr> license.</li> +<li><a href="https://github.com/pavkam/tzdb"><abbr>TZDB</abbr> – +<abbr>IANA</abbr> Time Zone Database for Delphi/<abbr +title="Free Pascal Compiler">FPC</abbr></a> +compiles from <code><abbr>tz</abbr></code> source into +<a href="https://en.wikipedia.org/wiki/Object_Pascal">Object Pascal</a> +as compiled by <a href="https://en.wikipedia.org/wiki/Delphi_(IDE)">Delphi</a> +and <a +href="https://en.wikipedia.org/wiki/Free_Pascal"><abbr>FPC</abbr></a>. +It is freely available under a <abbr>BSD</abbr>-style license.</li> +<li><a href="http://pytz.sourceforge.net">pytz – World Timezone +Definitions for Python</a> compiles <code><abbr>tz</abbr></code> source into +<a href="https://www.python.org">Python</a>. +It is freely available under a <abbr>BSD</abbr>-style license. +In code that can assume Python 3.6 or later it is largely superseded; see <a +href="https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html">pytz: +The Fastest Footgun in the West</a>.</li> +<li><a href="https://tzinfo.github.io">TZInfo – +Ruby Timezone Library</a> +compiles <code><abbr>tz</abbr></code> source into +<a href="https://www.ruby-lang.org/en/">Ruby</a>. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li>The <a href="https://www.squeaksource.com/Chronos/">Chronos Date/Time +Library</a> is +a <a href="https://en.wikipedia.org/wiki/Smalltalk">Smalltalk</a> class +library that compiles <code><abbr>tz</abbr></code> source into a time +zone repository whose format +is either proprietary or an <abbr>XML</abbr>-encoded +representation.</li> +<li><a id="Tcl" href="https://tcl.tk">Tcl</a> +contains a developer-oriented parser that compiles <code><abbr>tz</abbr></code> +source into text files, along with a runtime that can read those +files. Tcl is freely available under a <abbr>BSD</abbr>-style +license.</li> +</ul> +</section> + +<section> +<h2 id="TZif">Other <abbr>TZif</abbr> readers</h2> +<ul> +<li>The <a +href="https://www.gnu.org/software/libc/"><abbr>GNU</abbr> C +Library</a> +has an independent, thread-safe implementation of +a <abbr>TZif</abbr> file reader. +This library is freely available under the LGPL +and is widely used in <abbr>GNU</abbr>/Linux systems.</li> +<li><a href="https://www.gnome.org">GNOME</a>'s +<a href="https://developer.gnome.org/glib/">GLib</a> has +a <abbr>TZif</abbr> file reader written in C that +creates a <code>GTimeZone</code> object representing sets +of <abbr>UT</abbr> offsets. +It is freely available under the <abbr>LGPL</abbr>.</li> +<li>The +<a href="https://github.com/bloomberg/bde/wiki">BDE Standard Library</a>'s +<code>baltzo::TimeZoneUtil</code> component contains a C++ +implementation of a <abbr>TZif</abbr> file reader. It is freely available under +the Apache License.</li> +<li><a href="https://github.com/google/cctz">CCTZ</a> is a simple C++ +library that translates between <abbr>UT</abbr> and civil time and +can read <abbr>TZif</abbr> files. It is freely available under the Apache +License.</li> +<li><a href="https://github.com/derickr/timelib">Timelib</a> is a C +library that reads <abbr>TZif</abbr> files and converts +timestamps from one time zone or format to another. +It is used by <a href="https://secure.php.net"><abbr +title="PHP: Hypertext Preprocessor">PHP</abbr></a>, +<a href="https://hhvm.com"><abbr title="HipHop Virtual Machine">HHVM</abbr></a>, +and <a href="https://www.mongodb.com">MongoDB</a>. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li>Tcl, mentioned <a href="#Tcl">above</a>, also contains a +<abbr>TZif</abbr> file reader.</li> +<li><a href="https://metacpan.org/pod/DateTime::TimeZone::Tzfile"> +DateTime::TimeZone::Tzfile</a> +is a <abbr>TZif</abbr> file reader written in Perl. +It is freely available under the same terms as Perl +(dual <abbr>GPL</abbr> and Artistic license).</li> +<li>Python has a <a id="python-zoneinfo" +href="https://docs.python.org/3/library/zoneinfo.html"><code>zoneinfo.ZoneInfo</code> +class</a> that reads <abbr>TZif</abbr> data and creates objects +that represent <code><abbr>tzdb</abbr></code> timezones. +Python is freely available under the +<a href="https://docs.python.org/3/license.html">Python Software Foundation +License</a>. +A companion <a id="pypi-tzdata" href="https://pypi.org/">PyPI</a> module +<a href="https://pypi.org/project/tzdata/"><code>tzdata</code></a> +supplies TZif data if the underlying system data cannot be found; +it is freely available under the Apache License.</li> +<li>The +public-domain <a href="https://github.com/dbaron/tz.js">tz.js</a> +library contains a Python tool that +converts <abbr>TZif</abbr> data into +<abbr>JSON</abbr>-format data suitable for use +in its JavaScript library for time zone conversion. Dates before 1970 +are not supported.</li> +<li>The <a +href="https://hackage.haskell.org/package/timezone-olson">timezone-olson</a> +package contains <a href="https://www.haskell.org">Haskell</a> code that +parses and uses <abbr>TZif</abbr> data. It is freely +available under a <abbr>BSD</abbr>-style license.</li> +</ul> +</section> + +<section> +<h2 id="software">Other <code><abbr>tz</abbr></code>-based time zone software</h2> +<ul> +<li><a href="https://foxclocks.org">FoxClocks</a> +is an extension for <a href="https://www.google.com/chrome/">Google +Chrome</a> and for <a +href="https://wiki.mozilla.org/Modules/Toolkit">Mozilla +Toolkit</a> applications like <a +href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> and <a +href="https://www.mozilla.org/en-US/thunderbird/">Thunderbird</a>. +It displays multiple clocks in the application window, and has a mapping +interface to <a href="https://www.google.com/earth/">Google Earth</a>. +It is freely available under the <abbr>GPL</abbr>.</li> +<li><a href="https://golang.org">Go programming language</a> +implementations contain a copy of a 32-bit subset of a recent +<code><abbr>tz</abbr></code> database in a +Go-specific format.</li> +<li>Microsoft Windows 8.1 +and later has <code><abbr>tz</abbr></code> data and <abbr>CLDR</abbr> +data (mentioned <a href="#CLDR">below</a>) used by the +<a href="https://en.wikipedia.org/wiki/Windows_Runtime">Windows Runtime</a> / +<a href="https://en.wikipedia.org/wiki/Universal_Windows_Platform">Universal Windows Platform</a> classes +<a href="https://docs.microsoft.com/uwp/api/Windows.Globalization.DateTimeFormatting.DateTimeFormatter"><code>DateTimeFormatter</code></a> and +<a href="https://docs.microsoft.com/uwp/api/windows.globalization.calendar"><code>Calendar</code></a>. +<a id="System.TimeZoneInfo" +href="https://blogs.msdn.microsoft.com/bclteam |
