summaryrefslogtreecommitdiff
path: root/lib/libc/time/tz-link.htm
blob: 79869ff5ffab5592a7a944aac10abb558990f6e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"DTD/xhtml1-strict.dtd">
<!-- $OpenBSD: tz-link.htm,v 1.5 2003/01/07 17:37:37 millert Exp $ -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Sources for Time Zone and Daylight Saving Time Data</title>
<link rel="schema.DC" href="http://purl.org/DC/elements/1.1/" />
<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"' />
<meta name="DC.Creator" content="Eggert, Paul" />
<meta name="DC.Contributor" content="Olson, Arthur David" />
<meta name="DC.Date" content="2002-10-10" />
<meta name="DC.Description"
 content="Sources of information about time zones and daylight saving time" />
<meta name="DC.Identifier" content="http://www.twinsun.com/tz/tz-link.htm" />
<meta name="Keywords"
 content="database,daylight saving,DST,time zone,timezone,tz,zoneinfo" />
</head>
<body>
<h1>Sources for Time Zone and Daylight Saving Time Data</h1>
<address>
@(#)tz-link.htm	7.37
</address>
<p>
Please send corrections to this web page to the
<a href="mailto:tz@elsie.nci.nih.gov">time zone mailing list</a>.
</p>
<h2>The <code>tz</code> database</h2>
<p>
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 <code>tz</code> or <code>zoneinfo</code>)
is used by several implementations,
including
<a href="http://www.gnu.org/software/libc/">the GNU C Library</a> used in
<a href="http://www.linux.org/">GNU/Linux</a>,
<a href="http://www.freebsd.org/">FreeBSD</a>,
<a href="http://www.netbsd.org/">NetBSD</a>,
<a href="http://www.openbsd.org/">OpenBSD</a>,
<a href="http://www.delorie.com/djgpp/">DJGPP</a>,
<a href="http://www.hp.com/products1/unix/operating/">HP-UX</a>,
<a href="http://www.sgi.com/developers/technology/irix.html">IRIX</a>,
<a href="http://www.caldera.com/products/openunix/">Open UNIX/UnixWare</a>,
<a href="http://wwws.sun.com/software/solaris/">Solaris</a>, and
<a href="http://www.tru64unix.compaq.com/">Tru64</a>.</p>
<p>
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, <code>America/New_York</code>
represents most of the US eastern time zone;
<code>America/Indianapolis</code> represents most of Indiana, which
uses eastern time without daylight saving time (DST);
<code>America/Detroit</code> 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 <code>TZ</code> environment variable to
the location's full name, e.g., <code>TZ="America/New_York"</code>.</p>
<p>
In the <code>tz</code> database's
<a href="ftp://elsie.nci.nih.gov/pub/">FTP distribution</a>,
the code is in the file <code>tzcode<var>C</var>.tar.gz</code>,
where <code><var>C</var></code> is the code's version;
similarly, the data are in <code>tzdata<var>D</var>.tar.gz</code>,
where <code><var>D</var></code> is the data's version.
The following shell commands download
these files to a GNU/Linux or similar host; see the downloaded
<code>README</code> file for what to do next.</p>
<pre style="margin-left: 2em"><code><a href="http://www.gnu.org/software/wget/">wget</a> 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
<a href="http://www.gnu.org/software/gzip/">gzip</a> -dc tzcode*.tar.gz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf -
gzip -dc tzdata*.tar.gz | tar -xf -
</code></pre>
<p>
The code lets you compile the <code>tz</code> source files into
machine-readable binary files, one for each location. It also lets
you read a <code>tz</code> binary file and interpret time stamps for that
location.</p>
<p>
The data are by no means authoritative. If you find errors, please
send changes to the <a href="mailto:tz@elsie.nci.nih.gov">time zone
mailing list</a>. You can also <a
href="mailto:tz-request@elsie.nci.nih.gov">subscribe</a> to the
mailing list, or retrieve the <a
href="ftp://elsie.nci.nih.gov/pub/tzarchive.gz">archive of old
messages</a> (in gzip compressed format).</p>
<p>
The Web has several other sources for time zone and daylight saving time data.
Here are some recent links that may be of interest.
</p>
<h2>Web pages using recent versions of the <code>tz</code> database</h2>
<ul>
<li><a href="http://www.bsdi.com/date/">Date and Time Gateway</a> is a
text-based point-and-click interface to tables of current time
throughout the world.</li>
<li><a href="http://sandbox.xerox.com/stewart/tzconvert.cgi">Timezone
Converter</a> is a similar interface, with source code
written in <a href="http://www.perl.org/">Perl</a>, using what Paul
Stewart calls the "20-line hack no one will let me forget".</li>
<li>Fancier web interfaces, roughly in ascending order of complexity, include:
<ul>
<li><a href="http://www.hilink.com.au/times/">Local Times Around the
World</a></li>
<li><a href="http://www.convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current Time in 1000 Places</a></li>
<li><a href="http://timezoneconverter.com/">Time Zone Converter</a></li>
</ul></li>
<li><a href="http://www.holidayfestival.com/">The Worldwide Holiday
&amp; Festival Site</a> lists DST-related clock changes along with
holidays.</li>
<li><a href="http://www.timeanddate.com/worldclock/">The World Clock</a>
is a web interface to a time zone database derived from
<code>tz</code>'s.</li>
</ul>
<h2>Other <code>tz</code> compilers</h2>
<ul>
<li><a href="http://primates.ximian.com/~damon/icalendar/">Olson ->
VTIMEZONE Converter</a> describes a program Vzic that
compiles <code>tz</code> source into VTIMEZONE text as specified by
the <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2445.txt">iCalendar</a>
specification published by the <a
href="http://www.ietf.org/html.charters/calsch-charter.html">IETF
Calendaring and Scheduling Working Group</a>. Vzic is freely
available under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU
General Public License (GPL)</a>.</li>
<li>Possible XML schemata for the <code>tz</code> data include <a
href="http://www.w3.org/2000/01/foo">one</a> sketched out by <a
href="http://www.w3.org/People/Berners-Lee/">Tim Berners-Lee</a> and
<a
href="http://developer.iplanet.com/docs/wpapers/calendar/ietf.txt">another</a>
used by the <a
href="http://wwws.sun.com/software/products/calendar_srvr/home_calendar.html">Sun
ONE Calendar Server</a>.</li>
</ul>
<h2>Other <code>tz</code> binary file readers</h2>
<ul>
<li>The <a href="http://www.gnu.org/software/libc/">GNU C Library</a>
has an independent, thread-safe implementation of
a <code>tz</code> binary file reader.
This library is freely available under the
<a href="http://www.gnu.org/copyleft/lesser.html">
GNU Lesser General Public License (LGPL)</a>,
and is widely used in GNU/Linux systems.</li>
<li><a href="http://www.bmsi.com/java/#TZ">ZoneInfo.java</a>
is a <code>tz</code> binary file reader written in Java.
It is freely available under the GNU LGPL.</li>
</ul>
<h2>Other <code>tz</code>-based time zone conversion software</h2>
<ul>
<li><a
href="http://www1.tip.nl/~t876506/AboutTimeZonesHC.html">HyperCard
time zones calculator</a> is a HyperCard stack.</li>
<li><a
href="http://www.cimmyt.org/timezone/">Time Zone Converter</a> is a
Microsoft Windows program.</li>
</ul>
<h2>Other time zone databases</h2>
<ul>
<li><a href="http://www.astro.com/cgi-bin/atlw3/aq.cgi?lang=e">Astrodienst
- Atlas Query</a> is Astrodienst's Web version of Shanks's
excellent time zone history atlases published in both <a
href="http://astrocom.com/software/pcatlas.php">computer</a> and <a
href="http://astrocom.com/books/xrefa.php#SHANKS">book</a> form by <a
href="http://astrocom.com/">Astro Communications Services</a>.</li>
<li><a href="http://worldtime.com/">WORLDTIME: interactive atlas,
time info, public holidays</a>
contains information on local time, sunrise and sunset,
and public holidays in several hundred cities around the world.</li>
<li><a href="http://www.worldtimeserver.com/">World Time Server</a>
is another time zone database.</li>
<li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a>
contains data from the Time Service Department of the US Naval Observatory
(USNO), used as the source
for the <code>usno*</code> files in the <code>tz</code> distribution.</li>
<li><a href="http://www.airportcitycodes.com/aaa/">Airlines, Airplanes
and Airports</a> lists current standard times for thousands of
airports around the world. This seems to be derived from
the <a href="http://www.iata.org/sked/ssim.htm">Standard
Schedules Information Manual</a> of the
the <a href="http://www.iata.org/">International Air Transport
Association</a>,
which gives current time zone rules for
all the airports served by commercial aviation.</li>
</ul>
<h2>Maps</h2>
<ul>
<li>The <a href="http://www.odci.gov/">United States Central
Intelligence Agency (CIA)</a> publishes a <a
href="http://www.odci.gov/cia/publications/factbook/ref/pdf/802801.pdf">time
zone map</a>; the
<a
href="http://www.lib.utexas.edu/maps/world.html">Perry-Casta&ntilde;eda
Library Map Collection</a>
of the University of Texas at Austin has copies of
recent editions.
The pictorial quality is good,
but the maps do not indicate summer time,
and parts of the data are a few years out of date.</li>
<li><a href="http://worldtimezone.com/">World timezones map with
current time</a>
has several fancy time zone maps; it covers Russia particularly well.
The maps' pictorial quality is not quite as good as the CIA's
but the maps are more up to date.</li>
</ul>
<h2>Time zone boundaries</h2>
<ul>
<li>Manifold.net's <a
href="http://www.manifold.net/download/freemaps.html">Free Maps and
GIS Data</a> includes a Manifold-format map of world time zone
boundaries distributed under the GPL. The GeoCommunity's <a
href="http://software.geocomm.com/data/intl_timezones.html">International
Time Zones</a> publishes the same data in other formats.</li>
<li>The US Geological Survey's National Atlas of the United States
publishes the <a href="http://www.nationalatlas.gov/timeznm.html">Time
Zones of the United States</a> in the public domain.</li>
<li>The GeoCommunity lists several commercial sources for <a
href="http://spatialnews.geocomm.com/features/timezones/">International
Time Zones and Time Zone Data</a>.</li>
</ul>
<h2>Daylight saving time concepts and history</h2>
<ul>
<li><a href="http://physics.nist.gov/time">A Walk through Time</a>
surveys the evolution of timekeeping.</li>
<li><a href="http://webexhibits.com/daylightsaving/">About Daylight
Saving Time - History, rationale, laws and dates</a>
is an overall history of DST.</li>
<li><a href="http://toi.iriti.cnr.it/">The
Time of Internet</a>
describes time zones and daylight saving time,
with diagrams.
The time zone map is out of date, however.</li>
<li><a href="http://www.phys.uu.nl/~vgent/idl/idl.htm">A History of
the International Date Line</a> tells the story of the most important
time zone boundary.</li>
<li>A few countries have well-documented histories of legal time.
<dl>
<dt>Australia</dt>
<dd><a
href="http://www.dstc.qut.edu.au/DST/marg/daylight.html#more">Australia's
Daylight Saving Times</a> contains pointers to government records and to
histories of daylight saving.</dd>
<dt>Belgium</dt>
<dd>The Royal Observatory of Belgium maintains a table of <a
href="http://www.astro.oma.be/GENERAL/INFO/nli001a.html"
hreflang="nl">time in Belgium (in Dutch)</a>.</dd>
<dt>Brazil</dt>
<dd>The Time Service Department of the National Observatory
records <a href="http://pcdsh01.on.br/DecHV.html"
hreflang="pt-BR">Brazil's daylight saving time decrees (in
Portuguese)</a>.</dd>
<dt>Canada</dt>
<dd>The Institute for National Measurement Standards publishes current
and some older information about <a
href="http://www.nrc.ca/inms/time/tze.html">Time Zones and Daylight
Saving Time</a>.</dd>
<dt>Germany</dt>
<dd>The National Institute for Science and Technology maintains the <a
href="http://www.ptb.de/en/org/4/43/432/lega.htm">Realisation of
Legal Time in Germany</a>.</dd>
<dt>Israel</dt>
<dd>The Interior Ministry periodically issues <a
href="ftp://ftp.cs.huji.ac.il/pub/tz/announcements/"
hreflang="he">announcements (in Hebrew)</a>.</dd>
<dt>Mexico</dt>
<dd>The Investigation and Analysis Service of the Mexican Library of
Congress has published a <a
href="http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/"
hreflang="es">history of Mexican local time (in Spanish)</a>.</dd>
<dt>Netherlands</dt>
<dd><a href="http://www.phys.uu.nl/~vgent/wettijd/wettijd.htm"
hreflang="nl">Legal time in the Netherlands (in Dutch)</a>
covers the history of local time in the Netherlands from ancient times.</dd>
<dt>United Kingdom</dt>
<dd><a
href="http://student.cusu.cam.ac.uk/~jsm28/british-time/">History of
legal time in Britain</a> discusses in detail the country
with perhaps the best-documented history of clock adjustments.
The National Physical Laboratory also maintains an <a
href="http://www.npl.co.uk/time/summer_time_archive.html">archive
of summer time dates</a>.</dd>
</dl></li>
</ul>
<h2>Precision timekeeping</h2>
<ul>
<li><a
href="http://literature.agilent.com/litwebbin/purl.cgi?org_id=tmo&amp;pub_id=5965-7984E">The
Science of Timekeeping</a> is a thorough introduction
to the theory and practice of precision timekeeping.</li>
<li><a href="http://www.ntp.org/">Time Synchronization Server</a> discusses
the Network Time Protocol (NTP), used to synchronize clocks of
Internet hosts.</li>
<li><a href="http://gauss.gge.unb.ca/GMT.UT.and.the.RGO.txt"
charset="macintosh">A
Few Facts Concerning GMT, UT, and the RGO</a>
answers questions like "What is the difference between GMT and UTC?"</li>
<li><a
href="http://www.gb.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical
Times</a> explains more abstruse astronomical time scales like TT, TCG,
and TDB.</li>
<li>The <a href="http://www.iau.org/">IAU</a>'s <a
href="http://www.iau-sofa.rl.ac.uk/">Standards Of Fundamental
Astronomy</a> (SOFA) initiative publishes Fortran code for converting
among time scales like TAI, TDB, TT and UTC.</li>
<li><a href="http://www.jpl.nasa.gov/basics/bsf2-3.htm">Basics of
Space Flight - Reference Systems - Time Conventions</a>
briefly explains interplanetary space flight timekeeping.</li>
<li><a
href="http://hpiers.obspm.fr/eop-pc/products/bulletins.html">Bulletins
maintained by the IERS EOP (PC)</a> contains official publications of
the Earth Orientation Parameters Product Center of the
International Earth Rotation Service, the committee that decides
when leap seconds occur.</li>
<li>The <a
href="http://rom.usno.navy.mil/archives/leapsecs.html">Leap
Second Discussion List</a> covers <a
href="http://www.findarticles.com/cf_0/m0BPW/11_10/57821998/p1/article.jhtml">McCarthy
and Klepczynski's proposal to discontinue leap seconds</a>.
This proposal is being studied by the URSI Commission J <a
href="http://space.mit.edu/URSI/leapsecond.html">Working Group on the
Leap Second</a>, and the IAU
has plans to report on this proposal by 2003.</li>
</ul>
<h2>Time notation</h2>
<ul>
<li>
<a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">A Summary of
the International Standard Date and Time Notation</a> is a good
summary of ISO
8601:1988 - Data elements and interchange formats - Information interchange
- Representation of dates and times (which has been superseded by
<a href="http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26780">ISO 8601:2000</a>).</li>
<li>
Section 3.3 of <a
href="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt">Internet RFC 2822</a>
specifies the time notation used in email and <a
href="ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt">HTTP</a> headers.</li>
<li>
<a href="ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt">Internet RFC
3339</a> specifies an ISO 8601 profile for use in new Internet
protocols.</li>
<li>
<a href="http://www.exit109.com/~ghealton/y2k/yrexamples.html">The
Best of Dates, the Worst of Dates</a> covers many problems encountered
by software developers when handling dates and time stamps.</li>
<li>
Alphabetic time zone abbreviations should not be used as unique
identifiers for UTC offsets as they are ambiguous in practice. For
example, "EST" denotes 5 hours behind UTC in English-speaking North
America, but it denotes 10 or 11 hours ahead of UTC in Australia;
and French-speaking North Americans prefer "HNE" to "EST". For
compatibility with <a href="http://www.pasc.org/#POSIX">POSIX</a> the
<code>tz</code> database contains English abbreviations for all time
stamps but in many cases these are merely inventions of the database
maintainers.</li>
</ul>
<h2>Related indexes</h2>
<ul>
<li><a href="http://dmoz.org/Reference/Time/">Open Directory -
Reference: Time</a></li>
<li><a href="tz-art.htm">Time and the Arts</a></li>
<li><a href="http://dir.yahoo.com/Science/Measurements_and_Units/Time/Time_Zones/">Yahoo! - Science:Measurements and Units:Time:Time Zones</a></li>
</ul>
</body>
</html>