diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-02-27 16:40:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-02-27 16:40:36 +0000 |
commit | 09b6d45f857f04915b2823ba35607af69031707c (patch) | |
tree | db41e69361c8f9e43934d18a78272f9755f24e88 /lib/libc | |
parent | 0af022efeb05ae9ff082b16b36de19cbe6ccda37 (diff) |
Update to tzcode2007c from elsie.nci.nih.gov
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/time/tz-link.htm | 20 | ||||
-rw-r--r-- | lib/libc/time/zic.8 | 61 | ||||
-rw-r--r-- | lib/libc/time/zic.c | 9 |
3 files changed, 79 insertions, 11 deletions
diff --git a/lib/libc/time/tz-link.htm b/lib/libc/time/tz-link.htm index 40867322ac2..c467df53f2f 100644 --- a/lib/libc/time/tz-link.htm +++ b/lib/libc/time/tz-link.htm @@ -8,7 +8,7 @@ <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="2007-01-02"> +<meta name="DC.Date" content="2007-02-22"> <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"> @@ -18,7 +18,7 @@ <body> <h1>Sources for Time Zone and Daylight Saving Time Data</h1> <address> -@(#)tz-link.htm 8.9 +@(#)tz-link.htm 8.10 </address> <p> Please send corrections to this web page to the @@ -152,6 +152,9 @@ Consortium</a> is promoting further work in this area. <a href="http://www.calconnect.org/publications/icalendartimezoneproblemsandrecommendationsv1.0.pdf">iCalendar TIMEZONE Problems and Recommendations</a> offers guidelines and recommendations for the use of VTIMEZONE and <code>tz</code>.</li> +<li><a href="http://www.calconnect.org/dstlinks.html">Extended Daylight +Saving Time Links, Advisories and Changes</a> lists vendor material on recent +daylight saving time changes.</li> <li><a href="http://www.calconnect.org/publications/timezoneregistryandservicerecommendationsv1.0.pdf">Timezone Registry and Service Recommendations</a> discusses a @@ -216,6 +219,13 @@ compiles <code>tz</code> source into <a href="http://www.ruby-lang.org/">Ruby</a>. It is freely available under the <abbr title="Massachusetts Institute of Technology">MIT</abbr> license.</li> +<li>The <a href="http://www.chronos-st.org/">Chronos Date/Time +Library</a> is a <a href="http://smalltalk.org/">Smalltalk</a> class +library that compiles <code>tz</code> source into a <a +href="http://date-time-zone.com/">time zone repository</a> whose format +is either proprietary or an <a href="http://www.w3.org/XML/"><abbr +title="Extensible Markup Language">XML</abbr></a>-encoded +representation.</li> <li>Starting with version 8.5, <a href="http://www.tcl.tk/">Tcl</a> contains a developer-oriented parser that compiles <samp>tz</samp> source into text files, along with a runtime that can read those @@ -543,11 +553,9 @@ title="International Organization for Standardization">ISO</abbr> 8601:2004 -- Data elements and interchange formats -- Information interchange -- Representation of dates and times</a>.</li> <li> -<a href="http://www.w3.org/TR/xmlschema-2/#dateTime"><abbr -title="Extensible Markup Language">XML</abbr> +<a href="http://www.w3.org/TR/xmlschema-2/#dateTime"><abbr>XML</abbr> Schema: Datatypes - dateTime</a> specifies a format inspired by -<abbr>ISO</abbr> 8601 that is in common use in <a -href="http://www.w3.org/XML/"><abbr>XML</abbr></a> data.</li> +<abbr>ISO</abbr> 8601 that is in common use in XML data.</li> <li> <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt">Internet <abbr title="Request For Comments">RFC</abbr> 2822</a> §3.3 diff --git a/lib/libc/time/zic.8 b/lib/libc/time/zic.8 index a95b12c8878..c958991fade 100644 --- a/lib/libc/time/zic.8 +++ b/lib/libc/time/zic.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: zic.8,v 1.20 2007/02/07 15:24:58 jmc Exp $ +.\" $OpenBSD: zic.8,v 1.21 2007/02/27 16:40:35 millert Exp $ .Dd May 23, 1999 .Dt ZIC 8 .Os @@ -371,6 +371,63 @@ or (an abbreviation of) .Dq Rolling if the leap second time given by the other fields should be interpreted as local wall clock time. +.Sh EXTENDED EXAMPLE +Here is an extended example of +.Nm +input, intended to illustrate many of its features. +.br +.ne 22 +.nf +.in +2m +.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u +.sp +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Swiss 1940 only - Nov 2 0:00 1:00 S +Rule Swiss 1940 only - Dec 31 0:00 0 - +Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 S +Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0 +.sp .5 +Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S +Rule EU 1977 only - Sep lastSun 1:00u 0 - +Rule EU 1978 only - Oct 1 1:00u 0 - +Rule EU 1979 1995 - Sep lastSun 1:00u 0 - +Rule EU 1981 max - Mar lastSun 1:00u 1:00 S +Rule EU 1996 max - Oct lastSun 1:00u 0 - +.sp +.ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'0:34:08\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u +# Zone NAME GMTOFF RULES FORMAT UNTIL +Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 + 0:29:44 - BMT 1894 Jun + 1:00 Swiss CE%sT 1981 + 1:00 EU CE%sT +.sp +Link Europe/Zurich Switzerland +.sp +.in +.fi +In this example, the zone is named Europe/Zurich but it has an alias +as Switzerland. Zurich was 34 minutes and 8 seconds west of GMT until +1848-09-12 at 00:00, when the offset changed to 29 minutes and 44 +seconds. After 1894-06-01 at 00:00 Swiss daylight saving rules (defined +with lines beginning with "Rule Swiss") apply, and the GMT offset +became one hour. From 1981 to the present, EU daylight saving rules have +applied, and the UTC offset has remained at one hour. +.Pp +In 1940, daylight saving time applied from November 2 at 00:00 to +December 31 at 00:00. In 1941 and 1942, daylight saving time applied +from the first Sunday in May at 02:00 to the first Sunday in October +at 00:00. +The pre-1981 EU daylight-saving rules have no effect +here, but are included for completeness. Since 1981, daylight +saving has begun on the last Sunday in March at 01:00 UTC. +Until 1995 it ended the last Sunday in September at 01:00 UTC, +but this changed to the last Sunday in October starting in 1996. +.Pp +For purposes of +display, "LMT" and "BMT" were initially used, respectively. Since +Swiss rules and later EU rules were applied, the display name for the +timezone has been CET for standard time and CEST for daylight saving +time. .Sh NOTES For areas with more than two types of local time, you may need to use local standard time in the @@ -400,6 +457,6 @@ standard directory used for created files .Xr ctime 3 , .Xr tzfile 5 , .Xr zdump 8 -.\" @(#)zic.8 8.2 +.\" @(#)zic.8 8.3 .\" This file is in the public domain, so clarified as of .\" 2003-02-14 by Arthur David Olson. diff --git a/lib/libc/time/zic.c b/lib/libc/time/zic.c index ec09225454a..a7218ae8aba 100644 --- a/lib/libc/time/zic.c +++ b/lib/libc/time/zic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zic.c,v 1.27 2007/02/06 19:35:16 millert Exp $ */ +/* $OpenBSD: zic.c,v 1.28 2007/02/27 16:40:35 millert Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2006-07-17 by Arthur David Olson. @@ -2465,9 +2465,12 @@ register char * cp; else while ((*dp = *cp++) != '"') if (*dp != '\0') ++dp; - else error(_( + else { + error(_( "Odd number of quotation marks" )); + exit(1); + } } while (*cp != '\0' && *cp != '#' && (!isascii(*cp) || !isspace((unsigned char) *cp))); if (isascii(*cp) && isspace((unsigned char) *cp)) @@ -2655,7 +2658,7 @@ wp = _("time zone abbreviation differs from POSIX standard"); static int mkdirs(argname) -char * const argname; +char * argname; { register char * name; register char * cp; |