summaryrefslogtreecommitdiff
path: root/lib/libc/time
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/time')
-rw-r--r--lib/libc/time/README22
-rw-r--r--lib/libc/time/Theory50
-rw-r--r--lib/libc/time/difftime.c18
-rw-r--r--lib/libc/time/localtime.c18
-rw-r--r--lib/libc/time/private.h18
-rw-r--r--lib/libc/time/strftime.c16
-rw-r--r--lib/libc/time/tz-art.htm396
-rw-r--r--lib/libc/time/tz-link.htm230
-rw-r--r--lib/libc/time/zic.c29
9 files changed, 481 insertions, 316 deletions
diff --git a/lib/libc/time/README b/lib/libc/time/README
index 80276794113..c143c778e96 100644
--- a/lib/libc/time/README
+++ b/lib/libc/time/README
@@ -1,5 +1,5 @@
-$OpenBSD: README,v 1.3 1998/01/18 23:24:46 millert Exp $
-@(#)README 7.10
+$OpenBSD: README,v 1.4 2002/04/04 19:12:08 millert Exp $
+@(#)README 7.11
"What time is it?" -- Richard Deacon as The King
"Any time you want it to be." -- Frank Baxter as The Scientist
@@ -34,8 +34,22 @@ Since POSIX frowns on correct leap second handling, the default behavior of
the "zic" command (in the absence of a "-L" option) has been changed to omit
leap second information from its output files.
-Be sure to read the comments in "Makefile" and make any changes
-needed to make things right for your system.
+Here is a recipe for acquiring, building, installing, and testing the
+tz distribution on a GNU/Linux or similar host.
+
+ mkdir tz
+ cd tz
+ wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
+ gzip -dc tzcode*.tar.gz | tar -xf -
+ gzip -dc tzdata*.tar.gz | tar -xf -
+
+Be sure to read the comments in "Makefile" and make any changes needed
+to make things right for your system, especially if you are using some
+platform other than GNU/Linux. Then run the following commands,
+substituting your desired installation directory for "$HOME/tzdir":
+
+ make TOPDIR=$HOME/tzdir install
+ $HOME/tzdir/etc/zdump -v America/Los_Angeles
To use the new functions, use a "-ltz" option when compiling or linking.
diff --git a/lib/libc/time/Theory b/lib/libc/time/Theory
index 438845f2538..771ad484cff 100644
--- a/lib/libc/time/Theory
+++ b/lib/libc/time/Theory
@@ -1,4 +1,5 @@
-@(#)Theory 7.12
+$OpenBSD: Theory,v 1.8 2002/04/04 19:12:09 millert Exp $
+@(#)Theory 7.13
----- Outline -----
@@ -35,7 +36,7 @@ POSIX.1 has the following properties and limitations.
stdoffset[dst[offset],date[/time],date[/time]]
where:
-
+
std and dst
are 3 or more characters specifying the standard
and daylight saving time (DST) zone names.
@@ -179,11 +180,34 @@ so much the better.
----- Names of time zone rule files -----
-The names of this package's installed time zone rule files are chosen to
-help minimize possible future incompatibilities due to political events.
-Ordinarily, names of countries are not used, to avoid incompatibilities
-when countries change their name (e.g. Zaire->Congo) or
-when locations change countries (e.g. Hong Kong from UK colony to China).
+The time zone rule file naming conventions attempt to strike a balance
+among the following goals:
+
+ * Uniquely identify every national region where clocks have all
+ agreed since 1970. This is essential for the intended use: static
+ clocks keeping local civil time.
+
+ * Indicate to humans as to where that region is. This simplifes use.
+
+ * Be robust in the presence of political changes. This reduces the
+ number of updates and backward-compatibility hacks. For example,
+ names of countries are ordinarily not used, to avoid
+ incompatibilities when countries change their name
+ (e.g. Zaire->Congo) or when locations change countries
+ (e.g. Hong Kong from UK colony to China).
+
+ * Be portable to a wide variety of implementations.
+ This promotes use of the technology.
+
+ * Use a consistent naming convention over the entire world.
+ This simplifies both use and maintenance.
+
+This naming convention is not intended for use by inexperienced users
+to select TZ values by themselves (though they can of course examine
+and reuse existing settings). Distributors should provide
+documentation and/or a simple selection interface that explains the
+names; see the 'tzselect' program supplied with this distribution for
+one example.
Names normally have the form AREA/LOCATION, where AREA is the name
of a continent or ocean, and LOCATION is the name of a specific
@@ -272,7 +296,7 @@ in decreasing order of importance:
requires at least three characters for an
abbreviation. POSIX.1-1996 says that an abbreviation
cannot start with ':', and cannot contain ',', '-',
- '+', NUL, or a digit. Draft 5 of POSIX 1003.1-200x
+ '+', NUL, or a digit. Draft 7 of POSIX 1003.1-200x
changes this rule to say that an abbreviation can
contain only '-', '+', and alphanumeric characters in
the current locale. To be portable to both sets of
@@ -397,8 +421,8 @@ Newsgroups: soc.genealogy.german
Date: Tue, 9 Feb 1999 02:32:48 -800
Message-ID: <199902091032.CAA09644@netcom10.netcom.com>
-The following is a(n incomplete) listing, arranged chronologically, of
-European states, with the date they converted from the Julian to the
+The following is a(n incomplete) listing, arranged chronologically, of
+European states, with the date they converted from the Julian to the
Gregorian calendar:
04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
@@ -475,9 +499,9 @@ Gregorian calendar:
1760-1812 - Graub"unden
-The Russian empire (including Finland and the Baltic states) did not
+The Russian empire (including Finland and the Baltic states) did not
convert to the Gregorian calendar until the Soviet revolution of 1917.
-Source: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
-Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
+Source: H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
+Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
(Hannover: Hahnsche Buchhandlung, 1941), pp. 26-28.
diff --git a/lib/libc/time/difftime.c b/lib/libc/time/difftime.c
index f5e0c9c6bea..d5fa21fec35 100644
--- a/lib/libc/time/difftime.c
+++ b/lib/libc/time/difftime.c
@@ -4,8 +4,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID)
-static char elsieid[] = "@(#)difftime.c 7.7";
-static char rcsid[] = "$OpenBSD: difftime.c,v 1.5 1998/01/18 23:24:51 millert Exp $";
+static char elsieid[] = "@(#)difftime.c 7.9";
+static char rcsid[] = "$OpenBSD: difftime.c,v 1.6 2002/04/04 19:12:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
/*LINTLIBRARY*/
@@ -31,10 +31,16 @@ const time_t time0;
time_t delta;
time_t hibit;
- if (sizeof(time_t) < sizeof(double))
- return (double) time1 - (double) time0;
- if (sizeof(time_t) < sizeof(long_double))
- return (long_double) time1 - (long_double) time0;
+ {
+ time_t tt;
+ double d;
+ long_double ld;
+
+ if (sizeof tt < sizeof d)
+ return (double) time1 - (double) time0;
+ if (sizeof tt < sizeof ld)
+ return (long_double) time1 - (long_double) time0;
+ }
if (time1 < time0)
return -difftime(time0, time1);
/*
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index 106103ad80c..88821b7d954 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -4,8 +4,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID)
-static char elsieid[] = "@(#)localtime.c 7.70";
-static char rcsid[] = "$OpenBSD: localtime.c,v 1.20 2001/06/27 00:58:57 lebel Exp $";
+static char elsieid[] = "@(#)localtime.c 7.75";
+static char rcsid[] = "$OpenBSD: localtime.c,v 1.21 2002/04/04 19:12:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -320,8 +320,8 @@ register struct state * const sp;
{
struct tzhead * tzhp;
union {
- struct tzhead tzhead;
- char buf[sizeof *sp + sizeof *tzhp];
+ struct tzhead tzhead;
+ char buf[sizeof *sp + sizeof *tzhp];
} u;
int ttisstdcnt;
int ttisgmtcnt;
@@ -968,9 +968,9 @@ tzset_basic P((void))
return;
}
- if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
+ if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
return;
- lcl_is_set = (strlen(name) < sizeof(lcl_TZname));
+ lcl_is_set = strlen(name) < sizeof lcl_TZname;
if (lcl_is_set)
(void) strcpy(lcl_TZname, name);
@@ -989,6 +989,8 @@ tzset_basic P((void))
*/
lclptr->leapcnt = 0; /* so, we're off a little */
lclptr->timecnt = 0;
+ lclptr->typecnt = 0;
+ lclptr->ttis[0].tt_isdst = 0;
lclptr->ttis[0].tt_gmtoff = 0;
lclptr->ttis[0].tt_abbrind = 0;
(void) strcpy(lclptr->chars, gmt);
@@ -1409,7 +1411,9 @@ const int do_norm_secs;
}
if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE))
return WRONG;
- if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) {
+ if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)
+ saved_seconds = 0;
+ else if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) {
/*
** We can't set tm_sec to 0, because that might push the
** time below the minimum representable time.
diff --git a/lib/libc/time/private.h b/lib/libc/time/private.h
index 7fa953fd133..5d402fde11d 100644
--- a/lib/libc/time/private.h
+++ b/lib/libc/time/private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: private.h,v 1.13 2000/09/06 23:05:11 millert Exp $ */
+/* $OpenBSD: private.h,v 1.14 2002/04/04 19:12:09 millert Exp $ */
#ifndef PRIVATE_H
#define PRIVATE_H
@@ -33,7 +33,7 @@
#if 0
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 7.51";
+static char privatehid[] = "@(#)private.h 7.52";
#endif /* !defined NOID */
#endif /* !defined lint */
#endif
@@ -67,6 +67,10 @@ static char privatehid[] = "@(#)private.h 7.51";
#define HAVE_SYMLINK 1
#endif /* !defined HAVE_SYMLINK */
+#ifndef HAVE_SYS_STAT_H
+#define HAVE_SYS_STAT_H 1
+#endif /* !defined HAVE_SYS_STAT_H */
+
#ifndef HAVE_SYS_WAIT_H
#define HAVE_SYS_WAIT_H 1
#endif /* !defined HAVE_SYS_WAIT_H */
@@ -138,16 +142,6 @@ static char privatehid[] = "@(#)private.h 7.51";
*/
/*
-** SunOS 4.1.1 cc lacks const.
-*/
-
-#ifndef const
-#ifndef __STDC__
-#define const
-#endif /* !defined __STDC__ */
-#endif /* !defined const */
-
-/*
** SunOS 4.1.1 cc lacks prototypes.
*/
diff --git a/lib/libc/time/strftime.c b/lib/libc/time/strftime.c
index 54270afa5d7..3c2b8e3177c 100644
--- a/lib/libc/time/strftime.c
+++ b/lib/libc/time/strftime.c
@@ -1,6 +1,6 @@
#if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID)
-static char elsieid[] = "@(#)strftime.c 7.62";
-static char *rcsid = "$OpenBSD: strftime.c,v 1.7 2000/09/06 23:05:11 millert Exp $";
+static char elsieid[] = "@(#)strftime.c 7.64";
+static char *rcsid = "$OpenBSD: strftime.c,v 1.8 2002/04/04 19:12:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include "private.h"
@@ -534,7 +534,7 @@ label:
if (t->tm_isdst == 0)
#ifdef USG_COMPAT
diff = -timezone;
-#else /* defined USG_COMPAT */
+#else /* !defined USG_COMPAT */
continue;
#endif /* !defined USG_COMPAT */
else
@@ -606,7 +606,6 @@ _loc P((void))
static const char locale_home[] = LOCALE_HOME;
static const char lc_time[] = "LC_TIME";
static char * locale_buf;
- static char locale_buf_C[] = "C";
int fd;
int oldsun; /* "...ain't got nothin' to do..." */
@@ -645,8 +644,8 @@ _loc P((void))
** Slurp the locale file into the cache.
*/
namesize = strlen(name) + 1;
- if (sizeof(filename) <
- sizeof(locale_home) + namesize + sizeof(lc_time))
+ if (sizeof filename <
+ ((sizeof locale_home) + namesize + (sizeof lc_time)))
goto no_locale;
oldsun = 0;
(void) sprintf(filename, "%s/%s/%s", locale_home, name, lc_time);
@@ -668,8 +667,7 @@ _loc P((void))
goto bad_locale;
bufsize = namesize + st.st_size;
locale_buf = NULL;
- nlbuf = (lbuf == NULL || lbuf == locale_buf_C) ?
- malloc(bufsize) : realloc(lbuf, bufsize);
+ nlbuf = (lbuf == NULL) ? malloc(bufsize) : realloc(lbuf, bufsize);
if (nlbuf == NULL) {
if (lbuf)
free(lbuf);
@@ -723,7 +721,7 @@ bad_locale:
(void) close(fd);
no_locale:
localebuf = C_time_locale;
- locale_buf = locale_buf_C;
+ locale_buf = NULL;
return &localebuf;
}
#endif /* defined LOCALE_HOME */
diff --git a/lib/libc/time/tz-art.htm b/lib/libc/time/tz-art.htm
index 8a591323cf7..008b2dda864 100644
--- a/lib/libc/time/tz-art.htm
+++ b/lib/libc/time/tz-art.htm
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
-<!-- $OpenBSD: tz-art.htm,v 1.3 2001/03/26 15:25:51 millert Exp $ -->
+PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"DTD/xhtml1-strict.dtd">
+<!-- $OpenBSD: tz-art.htm,v 1.4 2002/04/04 19:12:09 millert Exp $ -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"' />
@@ -11,215 +11,243 @@
<body>
<h1>Time and the Arts</h1>
<address>
-@(#)tz-art.htm 7.40
+@(#)tz-art.htm 7.48
</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>
<p>
See also <a href="tz-link.htm">Sources for Time Zone and Daylight Saving Time Data</a>.</p>
-<pre>
-"Is that a pertinent fact, or are you trying to dazzle me with your command
-of time zones?"
- "Frasier Crane"
-==========================================================================
-Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:
---------------------------------------------------------------------------
-Artist: Karrin Allyson
-CD: I Didn't Know About You
-Copyright Date: 1993
-Label: Concord Jazz, Inc.
-ID: CCD-4543
-Track Time: 3:44
-Personnel: Karrin Allyson, vocal
- Russ Long, piano
- Gerald Spaits, bass
- Todd Strait, drums
-Notes: CD notes "additional lyric by Karrin Allyson;
- arranged by Russ Long and Karrin Allyson"
-ADO Rating: 1 star
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A175928">AMG Rating: 4 stars</a>
-Penguin Rating: 3.5 stars
---------------------------------------------------------------------------
-Artist: Kevin Mahogany
-CD: Double Rainbow
-Copyright Date: 1993
-Label: Enja Records
-ID: ENJ-7097 2
-Track Time: 6:27
-Personnel: Kevin Mahogany, vocal
- Kenny Barron, piano
- Ray Drummond, bss
- Ralph Moore, tenor saxophone
- Lewis Nash, drums
-ADO Rating: 1.5 stars
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A262654">AMG Rating: 3 stars</a>
-Penguin Rating: 3 stars
---------------------------------------------------------------------------
-Artist: Joe Williams
-CD: Here's to Life
-Copyright Date: 1994
-Label: Telarc International Corporation
-ID: CD-83357
-Track Time: 3:58
-Personnel: Joe Williams, vocal
- The Robert Farnon [39 piece] Orchestra
-Notes: This CD is also available as part of a 3-CD package from
- Telarc, "Triple Play" (CD-83461)
-ADO Rating: black dot
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A194434">AMG Rating: 2 stars</a>
-Penguin Rating: 3 stars
---------------------------------------------------------------------------
-Artist: Charles Fambrough
-CD: Keeper of the Spirit
-Copyright Date: 1995
-Label: AudioQuest Music
-ID: AQ-CD1033
-Track Time: 7:07
-Personnel: Charles Fambrough, bass
- Joel Levine, tenor recorder
- Edward Simon, piano
- Lenny White, drums
- Marion Simon, percussion
-Notes: On-line information and samples available at
- <a href="http://wwmusic.com/~music/audioq/rel/1033.html">http://wwmusic.com/~music/audioq/rel/1033.html</a>
-ADO Rating: 2 stars
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A224430">AMG Rating: unrated</a>
-Penguin Rating: 3 stars
-==========================================================================
-Also of note:
---------------------------------------------------------------------------
-Artist: Holly Cole Trio
-CD: Blame It On My Youth
-Copyright Date: 1992
-Label: Manhattan
-ID: CDP 7 97349 2
-Total Time: 37:45
-Personnel: Holly Cole, voice
- Aaron Davis, piano
- David Piltch, string bass
-Notes: Lyrical reference to "Eastern Standard Time" in
- Tom Waits' "Purple Avenue"
-ADO Rating: 2.5 stars
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A157959">AMG Rating: 3 stars</a>
-Penguin Rating: unrated
---------------------------------------------------------------------------
-Artist: Milt Hinton
-CD: Old Man Time
-Copyright Date: 1990
-Label: Chiaroscuro
-ID: CR(D) 310
-Total Time: 149:38 (two CDs)
-Personnel: Milt Hinton, bass
- Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet
- Al Grey, trombone
- Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
- clarinet and saxophone
- John Bunch, Red Richards, Norman Simmons, Derek Smith,
- Ralph Sutton, piano
- Danny Barker, Al Casey, guitar
- Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
- drums
- Lionel Hampton, vibraphone
- Cab Calloway, Joe Williams, vocal
- Buck Clayton, arrangements
-Notes: tunes include Old Man Time, Time After Time,
- Sometimes I'm Happy,
- A Hot Time in the Old Town Tonight,
- Four or Five Times, Now's the Time,
- Time on My Hands, This Time It's Us,
- and Good Time Charlie
- On-line samples available at
- <a href="http://www.globalmusic.com/labels/chiaroscuro/chiaro_cd_gallery.html">http://www.globalmusic.com/labels/chiaroscuro/chiaro_cd_gallery.html</a>
-ADO Rating: 3 stars
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A162344">AMG Rating: 4.5 stars</a>
-Penguin Rating: 3 stars
---------------------------------------------------------------------------
-Artist: Paul Broadbent
-CD: Pacific Standard Time
-Copyright Date: 1995
-Label: Concord Jazz, Inc.
-ID: CCD-4664
-Total Time: 62:42
-Personnel: Paul Broadbent, piano
- Putter Smith, Bass
- Frank Gibson, Jr., drums
-Notes: The CD cover features an analemma for equation-of-time fans
-ADO Rating: 1 star
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A223722">AMG Rating: 4 stars</a>
-Penguin Rating: 3.5 stars
---------------------------------------------------------------------------
-Artist: Anthony Braxton/Richard Teitelbaum
-CD: Silence/Time Zones
-Copyright Date: 1996
-Label: Black Lion
-ID: BLCD 760221
-Total Time: 72:58
-Personnel: Anthony Braxton, sopranino and alto saxophones,
- contrebasse clarinet, miscellaneous instruments
- Leo Smith, trumpet and miscellaneous instruments
- Leroy Jenkins, violin and miscellaneous instruments
- Richard Teitelbaum, modular moog and micromoog synthesizer
-ADO Rating: black dot
-<a href="http://www.allmusic.com/cg/x.dll?p=amg&amp;sql=A310757">AMG Rating: unrated</a>
---------------------------------------------------------------------------
-Artist: Jules Verne
-Book: Le Tour du Monde en Quatre-Vingts Jours
- (Around the World in Eighty Days)
-Notes: Wall-clock time plays a central role in the plot.
- European readers of the 1870s clearly held the U.S. press in
- deep contempt; the protagonists cross the U.S. without once
- reading a paper.
- An on-line French-language version of the book
- "with illustrations from the original 1873 French-language edition"
- is available at
- <a href="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</a>
- An on-line English-language translation of the book is available at
- <a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a>
---------------------------------------------------------------------------
-Film: Bell Science - About Time
-Notes: The Frank Baxter/Richard Deacon extravaganza
- Information on ordering is available at
- <a href="http://www.videoflicks.com/VF2/1035/1035893.ihtml">http://www.videoflicks.com/VF2/1035/1035893.ihtml</a>
---------------------------------------------------------------------------
+<hr />
+<p>
+Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:</p>
+<table>
+<tr><td>Artist</td><td>Karrin Allyson</td></tr>
+<tr><td>CD</td><td>I Didn't Know About You</td></tr>
+<tr><td>Copyright Date</td><td>1993</td></tr>
+<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
+<tr><td>ID</td><td>CCD-4543</td></tr>
+<tr><td>Track Time</td><td>3:44</td></tr>
+<tr><td>Personnel</td><td>Karrin Allyson, vocal;
+Russ Long, piano;
+Gerald Spaits, bass;
+Todd Strait, drums</td></tr>
+<tr><td>Notes</td><td>CD notes "additional lyric by Karrin Allyson;
+arranged by Russ Long and Karrin Allyson"</td></tr>
+<tr><td>ADO Rating</td><td>1 star</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=A1fdovw9ta92k">AMG Rating</a></td><td>4 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Kevin Mahogany</td></tr>
+<tr><td>CD</td><td>Double Rainbow</td></tr>
+<tr><td>Copyright Date</td><td>1993</td></tr>
+<tr><td>Label</td><td>Enja Records</td></tr>
+<tr><td>ID</td><td>ENJ-7097 2</td></tr>
+<tr><td>Track Time</td><td>6:27</td></tr>
+<tr><td>Personnel</td><td>Kevin Mahogany, vocal;
+Kenny Barron, piano;
+Ray Drummond, bass;
+Ralph Moore, tenor saxophone;
+Lewis Nash, drums</td></tr>
+<tr><td>ADO Rating</td><td>1.5 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=Akikbikzjbb19">AMG Rating</a></td><td>3 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Joe Williams</td></tr>
+<tr><td>CD</td><td>Here's to Life</td></tr>
+<tr><td>Copyright Date</td><td>1994</td></tr>
+<tr><td>Label</td><td>Telarc International Corporation</td></tr>
+<tr><td>ID</td><td>CD-83357</td></tr>
+<tr><td>Track Time</td><td>3:58</td></tr>
+<tr><td>Personnel</td><td>Joe Williams, vocal
+The Robert Farnon [39 piece] Orchestra</td></tr>
+<tr><td>Notes</td><td>This CD is also available as part of a 3-CD package from
+Telarc, "Triple Play" (CD-83461)</td></tr>
+<tr><td>ADO Rating</td><td>black dot</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=Amyyvad6kt8w1">AMG Rating</a></td><td>2 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Charles Fambrough</td></tr>
+<tr><td>CD</td><td>Keeper of the Spirit</td></tr>
+<tr><td>Copyright Date</td><td>1995</td></tr>
+<tr><td>Label</td><td>AudioQuest Music</td></tr>
+<tr><td>ID</td><td>AQ-CD1033</td></tr>
+<tr><td>Track Time</td><td>7:07</td></tr>
+<tr><td>Personnel</td><td>Charles Fambrough, bass;
+Joel Levine, tenor recorder;
+Edward Simon, piano;
+Lenny White, drums;
+Marion Simon, percussion</td></tr>
+<tr><td>Notes</td><td>On-line information and samples available at
+<a href="http://wwmusic.com/~music/audioq/rel/1033.html">http://wwmusic.com/~music/audioq/rel/1033.html</a></td></tr>
+<tr><td>ADO Rating</td><td>2 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=A5rkcikcjbb89">AMG Rating</a></td><td>unrated</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+</table>
+<hr />
+<p>Also of note:</p>
+<table>
+<tr><td>Artist</td><td>Holly Cole Trio</td></tr>
+<tr><td>CD</td><td>Blame It On My Youth</td></tr>
+<tr><td>Copyright Date</td><td>1992</td></tr>
+<tr><td>Label</td><td>Manhattan</td></tr>
+<tr><td>ID</td><td>CDP 7 97349 2</td></tr>
+<tr><td>Total Time</td><td>37:45</td></tr>
+<tr><td>Personnel</td><td>Holly Cole, voice;
+Aaron Davis, piano;
+David Piltch, string bass</td></tr>
+<tr><td>Notes</td><td>Lyrical reference to "Eastern Standard Time" in
+Tom Waits' "Purple Avenue"</td></tr>
+<tr><td>ADO Rating</td><td>2.5 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=A3a9ds37ya3dg">AMG Rating</a></td><td>3 stars</td></tr>
+<tr><td>Penguin Rating</td><td>unrated</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Milt Hinton</td></tr>
+<tr><td>CD</td><td>Old Man Time</td></tr>
+<tr><td>Copyright Date</td><td>1990</td></tr>
+<tr><td>Label</td><td>Chiaroscuro</td></tr>
+<tr><td>ID</td><td>CR(D) 310</td></tr>
+<tr><td>Total Time</td><td>149:38 (two CDs)</td></tr>
+<tr><td>Personnel</td><td>Milt Hinton, bass;
+Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet;
+Al Grey, trombone;
+Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate,
+clarinet and saxophone;
+John Bunch, Red Richards, Norman Simmons, Derek Smith,
+Ralph Sutton, piano;
+Danny Barker, Al Casey, guitar;
+Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams,
+drums;
+Lionel Hampton, vibraphone;
+Cab Calloway, Joe Williams, vocal;
+Buck Clayton, arrangements</td></tr>
+<tr><td>Notes</td><td>tunes include Old Man Time, Time After Time,
+Sometimes I'm Happy,
+A Hot Time in the Old Town Tonight,
+Four or Five Times, Now's the Time,
+Time on My Hands, This Time It's Us,
+and Good Time Charlie
+On-line samples available at
+<a href="http://www.chiaroscurojazz.com/albuminfo.php4?albumid=49">http://www.chiaroscurojazz.com/albuminfo.php3?albumid=49</a></td></tr>
+<tr><td>ADO Rating</td><td>3 stars</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=A1cbyxdab8ola">AMG Rating</a></td><td>4.5 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3 stars</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Alan Broadbent</td></tr>
+<tr><td>CD</td><td>Pacific Standard Time</td></tr>
+<tr><td>Copyright Date</td><td>1995</td></tr>
+<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr>
+<tr><td>ID</td><td>CCD-4664</td></tr>
+<tr><td>Total Time</td><td>62:42</td></tr>
+<tr><td>Personnel</td><td>Alan Broadbent, piano;
+Putter Smith, Bass;
+Frank Gibson, Jr., drums</td></tr>
+<tr><td>Notes</td><td>The CD cover features an analemma for equation-of-time fans</td></tr>
+<tr><td>ADO Rating</td><td>1 star</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=Asl8zefuk8gfo">AMG Rating</a></td><td>4 stars</td></tr>
+<tr><td>Penguin Rating</td><td>3.5 stars</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Anthony Braxton/Richard Teitelbaum</td></tr>
+<tr><td>CD</td><td>Silence/Time Zones</td></tr>
+<tr><td>Copyright Date</td><td>1996</td></tr>
+<tr><td>Label</td><td>Black Lion</td></tr>
+<tr><td>ID</td><td>BLCD 760221</td></tr>
+<tr><td>Total Time</td><td>72:58</td></tr>
+<tr><td>Personnel</td><td>Anthony Braxton, sopranino and alto saxophones,
+contrebasse clarinet, miscellaneous instruments;
+Leo Smith, trumpet and miscellaneous instruments;
+Leroy Jenkins, violin and miscellaneous instruments;
+Richard Teitelbaum, modular moog and micromoog synthesizer</td></tr>
+<tr><td>ADO Rating</td><td>black dot</td></tr>
+<tr><td><a href="http://www.allmusic.com/cg/amg.dll?p=amg&amp;sql=A5bkvu3xjan1k">AMG Rating</a></td><td>unrated</td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Jules Verne</td></tr>
+<tr><td>Book</td><td>Le Tour du Monde en Quatre-Vingts Jours
+(Around the World in Eighty Days)</td></tr>
+<tr><td>Notes</td><td>Wall-clock time plays a central role in the plot.
+European readers of the 1870s clearly held the U.S. press in
+deep contempt; the protagonists cross the U.S. without once
+reading a paper.
+An on-line French-language version of the book
+"with illustrations from the original 1873 French-language edition"
+is available at
+<a href="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</a>
+An on-line English-language translation of the book is available at
+<a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a></td></tr>
+<tr><td>&nbsp;</td></tr>
+<tr><td>Film</td><td>Bell Science - About Time</td></tr>
+<tr><td>Notes</td><td>The Frank Baxter/Richard Deacon extravaganza
+Information on ordering is available at
+<a href="http://www.videoflicks.com/VF2/1035/1035893.ihtml">http://www.videoflicks.com/VF2/1035/1035893.ihtml</a></td></tr>
+</table>
+<hr />
+<ul>
+<li>
An episode of "The Adventures of Superman" entitled "The Mysterious
Cube," first aired 1958-02-24, had Superman convincing the controllers
of WWV to broadcast time signals five minutes ahead of actual time;
doing so got a crook trying to beat the statute of limitations to
emerge a bit too early from the titular enclosure.
---------------------------------------------------------------------------
+</li>
+<li>
The 1960s ITC television series "The Prisoner" included an episode
entitled "The Chimes of Big Ben" in which our protagonist tumbled to
the fraudulent nature of a Poland-to-England escape upon hearing "Big
Ben" chiming on Polish local time.
---------------------------------------------------------------------------
+</li>
+<li>
The series "Seinfeld" included an episode entitled "The Susie," first
broadcast 1997-02-13, in which Kramer decides that daylight saving time
isn't coming fast enough, so he sets his watch ahead an hour.
---------------------------------------------------------------------------
+</li>
+<li>
The syndicated comic strip "Dilbert" featured an all-too-rare example of
time zone humor on 1998-03-14.
---------------------------------------------------------------------------
+</li>
+<li>
Surrealist artist Guy Billout's work "Date Line" appeared on page 103
of the November, 1999 Atlantic Monthly.
---------------------------------------------------------------------------
+</li>
+<li>
"In what time zone would you find New York City?" was a $200 question on
-the 1999-11-13 United States airing of "Who Wants to be a Millionaire?"
-==========================================================================
+the 1999-11-13 United States airing of "Who Wants to Be a Millionaire?"
+"In 1883, what industry led the movement to divide the U.S. into four time
+zones?" was a $32,000 question on the 2001-05-23 United States airing of
+"Who Wants to Be a Millionaire?" At this rate, the million-dollar time-zone
+question will be asked 2002-06-04.
+</li>
+</ul>
+<hr />
+<ul>
+<li>
+"We're been using the five-cent nickle in this country since 1492.
+Now that's pretty near 100 years, daylight savings [sic]."
+(Groucho Marx as Captain Spaulding in "Animal Crackers", 1930,
+as noted by Will Fitzerald, wfitzgerald@ameritech.net)
+</li>
+<li>
"Good news."
"What did they do? Extend Daylight Saving Time year round?"
- Professional tanner George Hamilton, in dialog from a
- May, 1999 episode of the syndicated television series "Baywatch"
---------------------------------------------------------------------------
+(Professional tanner George Hamilton, in dialog from a
+May, 1999 episode of the syndicated television series "Baywatch")
+</li>
+<li>
"A fundamental belief held by Americans is that if you are on land, you
cannot be killed by a fish...So most Americans remain on land, believing
-they're safe. Unfortunately, this belief--like so many myths, such as that
-there's a reason for 'Daylight Saving Time'--is false."
- Dave Barry column, 2000-07-02
---------------------------------------------------------------------------
+they're safe. Unfortunately, this belief&mdash;like so many myths, such as that
+there's a reason for 'Daylight Saving Time'&mdash;is false."
+(Dave Barry column, 2000-07-02)
+</li>
+<li>
"I once had sex for an hour and five minutes, but that was on the day
when you turn the clocks ahead."
- Garry Shandling, 52nd Annual Emmys, 2000-09-10
-</pre>
+(Garry Shandling, 52nd Annual Emmys, 2000-09-10)
+</li>
+<li>
+"Is that a pertinent fact, or are you trying to dazzle me with your command
+of time zones?"
+(Kelsey Grammer as "Frasier Crane")
+</li>
+</ul>
</body>
</html>
diff --git a/lib/libc/time/tz-link.htm b/lib/libc/time/tz-link.htm
index d7bee9bfefc..9fe4edbae33 100644
--- a/lib/libc/time/tz-link.htm
+++ b/lib/libc/time/tz-link.htm
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="US-ASCII"?>
-<!DOCTYPE html
+<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
-<!-- $OpenBSD: tz-link.htm,v 1.3 2001/03/26 15:25:51 millert Exp $ -->
+<!-- $OpenBSD: tz-link.htm,v 1.4 2002/04/04 19:12:09 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="Paul Eggert" />
-<meta name="DC.Contributor" content="Arthur David Olson" />
-<meta name="DC.Date" content="2000/10/03" />
+<meta name="DC.Creator" content="Eggert, Paul" />
+<meta name="DC.Contributor" content="Olson, Arthur David" />
+<meta name="DC.Date" content="2002-03-26" />
<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" />
@@ -20,20 +20,20 @@
<body>
<h1>Sources for Time Zone and Daylight Saving Time Data</h1>
<address>
-@(#)tz-link.htm 7.30
+@(#)tz-link.htm 7.35
</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 <samp>tz</samp> database</h2>
+<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 <samp>tz</samp> or <samp>zoneinfo</samp>)
+This database (often called <code>tz</code> or <code>zoneinfo</code>)
is used by several implementations,
including
<a href="http://www.linux.org/">GNU/Linux</a>,
@@ -41,20 +41,45 @@ including
<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://unix.hp.com/operating/">HP-UX</a>,
+<a href="http://www.hp.com/products1/unix/operating/index.html">HP-UX</a>,
<a href="http://www.sgi.com/developers/technology/irix.html">IRIX</a>,
-<a href="http://www.sco.com/products/openserver/">SCO OpenServer</a>,
+<a href="http://www.caldera.com/products/openunix/">Open UNIX</a>,
<a href="http://www.sun.com/solaris/">Solaris</a>, and
-<a href="http://www.sco.com/unixware/">UnixWare</a>.
-In the <samp>tz</samp> database's
+<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 <samp>tzcode<var>C</var>.tar.gz</samp>,
-where <samp><var>C</var></samp> is the code's version;
-similarly, the data are in <samp>tzdata<var>D</var>.tar.gz</samp>,
-where <samp><var>D</var></samp> is the data's version.
-The code lets you compile the text data into time zone files, one for
-each location. It also lets you read a compiled time zone file and
-interpret time stamps for that location.</p>
+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
@@ -62,19 +87,18 @@ 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 <a href="http://www.gzip.org/">gzip</a> compressed
-format).</p>
+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 <samp>tz</samp> database</h2>
+<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">CGI/1.0
-URL Timezone Converter</a> is a similar interface, with source code
+<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:
@@ -84,36 +108,54 @@ 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.tick2tock.com/cgi-bin/TZConverter">Tick2Tock
-time zone converter</a> is a multilingual interface.</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
-<samp>tz</samp>'s.</li>
+<code>tz</code>'s.</li>
</ul>
-<h2>Other time zone file readers</h2>
+<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.isi.edu/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://www.iplanet.com/products/iplanet_calendar/">iPlanet
+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 time zone file reader that is compatible with <samp>tz</samp>.
+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 time zone file reader written in Java.
+is a <code>tz</code> binary file reader written in Java.
It is freely available under the GNU LGPL.</li>
</ul>
-<h2>Other <samp>tz</samp>-based time zone conversion software</h2>
+<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://timezone50.homepage.com/">Time Zone Converter</a> is a
-Microsoft Windows 95/98/NT4 program.</li>
+href="http://www20.Brinkster.com/timezone50/">Time Zone Converter</a> is a
+Microsoft Windows program.</li>
</ul>
<h2>Other time zone databases</h2>
<ul>
@@ -121,20 +163,25 @@ Microsoft Windows 95/98/NT4 program.</li>
- 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.html">computer</a> and <a
-href="http://astrocom.com/books/xrefa.htm#SHANKS">book</a> form by <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 <samp>usno*</samp> files in the <samp>tz</samp> distribution.</li>
-<li>The <a href="http://www.iata.org/">International
-Air Transport Association</a>
-publishes the <a href="http://www.iata.org/sked/ssim.htm">Standard
-Schedules Information Manual</a>,
+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>
@@ -142,12 +189,13 @@ all the airports served by commercial aviation.</li>
<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/reference/Low%20res%20PDF/low802700.pdf">time
+href="http://www.odci.gov/cia/publications/factbook/ref/pdf/802801.pdf">time
zone map</a>; the
-<a href="http://www.lib.utexas.edu/Libs/PCL/Map_collection/world_maps.html">
-Perry-Casta&ntilde;eda Library Map Collection</a>
+<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.
+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>
@@ -156,23 +204,21 @@ 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>
-<li><a href="http://www.worldtimeserver.com/">World Time Server</a>
-has a separate little outline map for each region of each country that
-currently observes a different time.</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 <a
-href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License
-(GPL)</a>. The GeoCommunity's <a
+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 National Weather Service publishes <a
+href="http://isl715.nws.noaa.gov/mapdata/newcat/county/county_all.htm">outlines
+of US counties and their time zones</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>
@@ -184,39 +230,58 @@ Saving Time - History, rationale, laws and dates</a>
is a good overall history of DST.</li>
<li><a href="http://toi.iriti.cnr.it/">The
Time of Internet</a>
-contains good descriptions of Time Zones and daylight saving time,
+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>The Community Relations Division of the NSW Attorney General's
-Department maintains a history of <a
-href="http://www.lawlink.nsw.gov.au/crd.nsf/pages/time2">daylight
-saving in New South Wales</a>.</dd>
+<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/english/org/4/43/432/lega.htm">Realisation of
+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 Ministry of Interior periodically issues <a
-href="ftp://ftp.huji.ac.il/pub/tz/announcements"
+<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> is an excellent discussion for the country
-with perhaps the best-documented history of clock adjustments.</dd>
+with perhaps the best-documented history of clock adjustments.
+The National Physical Laboratory also maintains an <a
+href="http://www.npl.co.uk/npl/ctm/summer_time_archive.html">archive
+of summer time dates</a>.</dd>
</dl></li>
</ul>
<h2>Precision timekeeping</h2>
@@ -225,32 +290,38 @@ with perhaps the best-documented history of clock adjustments.</dd>
href="http://literature.agilent.com/litwebbin/purl.cgi?org_id=tmo&amp;pub_id=5965-7984E">The
Science of Timekeeping</a> is an excellent and thorough introduction
to the theory and practice of precision timekeeping.</li>
-<li><a href="http://www.eecis.udel.edu/~ntp/">Time Server</a> discusses
+<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://ecco.bsee.swin.edu.au/chronos/GMT-explained.html">A
+<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://sadira.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/webiers/results/bul/README.html">Bulletins
-of IERS</a> contains official publications of the
+<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://clockdev.usno.navy.mil/archives/leapsecs.html">Leap
+href="http://rom.usno.navy.mil/cgi-bin/wa">Leap
Second Discussion List</a> covers <a
-href="http://clockdev.usno.navy.mil/cgi-bin/wa.exe?A3=ind00&amp;L=leapsecs&amp;P=28537&amp;E=2&amp;B=------_=_NextPart_000_01C0781C.F015C5B0&amp;N=GPS-Nov99_Innov.pdf&amp;T=application/octet-stream">McCarthy
-and Klepczynski's proposal to remove leap seconds</a>
-(which requires discussion list membership to read).
+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 <a href="http://www.iau.org/">IAU</a>
+Leap Second</a>, and the IAU
has plans to report on this proposal by 2003.</li>
</ul>
<h2>Time notation</h2>
@@ -258,9 +329,30 @@ has plans to report on this proposal by 2003.</li>
<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 <a href="http://www.iso.ch/markete/8601.pdf">ISO
+summary of ISO
8601:1988 - Data elements and interchange formats - Information interchange
-- Representation of dates and times</a>.</li>
+- Representation of dates and times (which has been superseded by
+<a href="http://www.iso.ch/cate/d26780.html">ISO 8601:2000</a>).</li>
+<li>
+Section 3.3 of <a
+href="ftp://ftp.isi.edu/in-notes/rfc2822.txt">Internet RFC 2822</a>
+specifies the time notation used in email and <a
+href="ftp://ftp.isi.edu/in-notes/rfc2616.txt">HTTP</a> headers.</li>
+<li>
+<a
+href="ftp://ftp.isi.edu/internet-drafts/draft-ietf-impp-datetime-05.txt">Date
+and Time on the Internet: Timestamps</a> proposes an ISO 8601 profile
+for use in new Internet protocols.</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>
diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c
index 23ccf3bbef8..74613afac59 100644
--- a/lib/libc/time/zic.c
+++ b/lib/libc/time/zic.c
@@ -1,14 +1,20 @@
#if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID)
-static char elsieid[] = "@(#)zic.c 7.101";
-static char rcsid[] = "$OpenBSD: zic.c,v 1.15 2000/09/06 23:05:12 millert Exp $";
+static char elsieid[] = "@(#)zic.c 7.107";
+static char rcsid[] = "$OpenBSD: zic.c,v 1.16 2002/04/04 19:12:09 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include "private.h"
#include "locale.h"
#include "tzfile.h"
-#ifdef __unix__
-#include "sys/stat.h" /* for umask manifest constants */
-#endif /* defined __unix__ */
+
+#if HAVE_SYS_STAT_H
+#include "sys/stat.h"
+#endif
+#ifdef S_IRUSR
+#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
+#else
+#define MKDIR_UMASK 0755
+#endif
/*
** On some ancient hosts, predicates like `isspace(C)' are defined
@@ -1588,16 +1594,16 @@ const int zonecount;
typecnt = 0;
charcnt = 0;
/*
- ** A guess that may well be corrected later.
- */
- stdoff = 0;
- /*
** Thanks to Earl Chew (earl@dnd.icp.nec.com.au)
** for noting the need to unconditionally initialize startttisstd.
*/
startttisstd = FALSE;
startttisgmt = FALSE;
for (i = 0; i < zonecount; ++i) {
+ /*
+ ** A guess that may well be corrected later.
+ */
+ stdoff = 0;
zp = &zpfirst[i];
usestart = i > 0 && (zp - 1)->z_untiltime > min_time;
useuntil = i < (zonecount - 1);
@@ -1617,8 +1623,7 @@ const int zonecount;
if (usestart) {
addtt(starttime, type);
usestart = FALSE;
- }
- else if (stdoff != 0)
+ } else if (stdoff != 0)
addtt(min_time, type);
} else for (year = min_year; year <= max_year; ++year) {
if (useuntil && year > zp->z_untilrule.r_hiyear)
@@ -2176,7 +2181,7 @@ char * const argname;
** created by some other multiprocessor, so we get
** to do extra checking.
*/
- if (mkdir(name, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0) {
+ if (mkdir(name, MKDIR_UMASK) != 0) {
const char *e = strerror(errno);
if (errno != EEXIST || !itsdir(name)) {