aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1999-01-21 17:18:06 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1999-01-21 17:18:06 +0000
commit7807f372ee411b30d7488ac87b05055035e4807a (patch)
tree029fc52ea7edd01f7c1d2c2e36700699731ffa6e
parent22c654616a6e4e17e2c466703c05694f2c63d174 (diff)
downloadsrc-7807f372ee411b30d7488ac87b05055035e4807a.tar.gz
src-7807f372ee411b30d7488ac87b05055035e4807a.zip
Update timezone file description to match new zic (coming soon).
Update man page to reflect reality.
Notes
Notes: svn path=/vendor/tzcode/dist/; revision=42986
-rw-r--r--lib/libc/stdtime/tzfile.525
-rw-r--r--lib/libc/stdtime/tzfile.h13
2 files changed, 28 insertions, 10 deletions
diff --git a/lib/libc/stdtime/tzfile.5 b/lib/libc/stdtime/tzfile.5
index 1d47033848b3..c7ef0b4ff477 100644
--- a/lib/libc/stdtime/tzfile.5
+++ b/lib/libc/stdtime/tzfile.5
@@ -7,14 +7,19 @@ tzfile \- time zone information
.SH DESCRIPTION
The time zone information files used by
.IR tzset (3)
-begin with bytes reserved for future use,
-followed by four four-byte values of type
+begin with the magic characters "TZif" to identify then as
+time zone information files,
+followed by sixteen bytes reserved for future use,
+followed by six four-byte values of type
.BR long ,
written in a ``standard'' byte order
(the high-order byte of the value is written first).
These values are,
in order:
.TP
+.I tzh_ttisgmtcnt
+The number of UTC/local indicators stored in the file.
+.TP
.I tzh_ttisstdcnt
The number of standard/wall indicators stored in the file.
.TP
@@ -74,7 +79,7 @@ and a one-byte value for
.IR tt_abbrind .
In each structure,
.I tt_gmtoff
-gives the number of seconds to be added to GMT,
+gives the number of seconds to be added to UTC,
.I tt_isdst
tells whether
.I tm_isdst
@@ -99,7 +104,7 @@ the second gives the
number of leap seconds to be applied after the given time.
The pairs of values are sorted in ascending order by time.
.PP
-Finally there are
+Then there are
.I tzh_ttisstdcnt
standard/wall indicators, each stored as a one-byte value;
they tell whether the transition times associated with local time types
@@ -107,6 +112,14 @@ were specified as standard time or wall clock time,
and are used when a time zone file is used in handling POSIX-style
time zone environment variables.
.PP
+Finally there are
+.I tzh_ttisgmtcnt
+UTC/local indicators, each stored as a one-byte value;
+they tell whether the transition times associated with local time types
+were specified as UTC or local time,
+and are used when a time zone file is used in handling POSIX-style
+time zone environment variables.
+.PP
.I Localtime
uses the first standard-time
.I ttinfo
@@ -120,4 +133,6 @@ is zero or the time argument is less than the first transition time recorded
in the file.
.SH SEE ALSO
newctime(3)
-.\" @(#)tzfile.5 7.2
+.\" @(#)tzfile.5 7.11
+.\" This file is in the public domain, so clarified as of
+.\" 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
diff --git a/lib/libc/stdtime/tzfile.h b/lib/libc/stdtime/tzfile.h
index cb9b6a1a11e1..0921c3c3396e 100644
--- a/lib/libc/stdtime/tzfile.h
+++ b/lib/libc/stdtime/tzfile.h
@@ -4,7 +4,7 @@
/*
** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
+** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
*/
/*
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char tzfilehid[] = "@(#)tzfile.h 7.8";
+static char tzfilehid[] = "@(#)tzfile.h 7.14";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -45,8 +45,11 @@ static char tzfilehid[] = "@(#)tzfile.h 7.8";
** Each file begins with. . .
*/
+#define TZ_MAGIC "TZif"
+
struct tzhead {
- char tzh_reserved[20]; /* reserved for future use */
+ char tzh_magic[4]; /* TZ_MAGIC */
+ char tzh_reserved[16]; /* reserved for future use */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
char tzh_leapcnt[4]; /* coded number of leap seconds */
@@ -61,7 +64,7 @@ struct tzhead {
** tzh_timecnt (char [4])s coded transition times a la time(2)
** tzh_timecnt (unsigned char)s types of local time starting at above
** tzh_typecnt repetitions of
-** one (char [4]) coded GMT offset in seconds
+** one (char [4]) coded UTC offset in seconds
** one (unsigned char) used to set tm_isdst
** one (unsigned char) that's an abbreviation list index
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
@@ -74,7 +77,7 @@ struct tzhead {
** if absent, transition times are
** assumed to be wall clock time
** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
-** time is GMT, if FALSE,
+** time is UTC, if FALSE,
** transition time is local time
** if absent, transition times are
** assumed to be local time