[BACK]Return to tzfile.5 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / time

File: [cvs.NetBSD.org] / src / lib / libc / time / tzfile.5 (download)

Revision 1.12, Wed Apr 16 13:34:58 2003 UTC (18 years ago) by wiz
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, mjf-devfs2-base, mjf-devfs2, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, christos-time_t-nbase, christos-time_t-base, christos-time_t, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: jym-xensuspend
Changes since 1.11: +2 -2 lines

.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.

.\"	$NetBSD: tzfile.5,v 1.12 2003/04/16 13:34:58 wiz Exp $
.\" @(#)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).
.Dd September 16, 2001
.Nm tzfile
.Nd time zone information
.In tzfile.h
The time zone information files used by
.Xr tzset 3
begin with the magic characters
.Dq TZif
to identify them as time zone information files,
followed by sixteen bytes reserved for future use,
followed by six four-byte values of type
.Fa long ,
written in a
.Dq standard
byte order (the high-order byte of the value is written first).
These values are, in order:
.Bl -tag -width XXXXXX -compact
.It Va tzh_ttisgmtcnt
The number of UTC/local indicators stored in the file.
.It Va tzh_ttisstdcnt
The number of standard/wall indicators stored in the file.
.It Va tzh_leapcnt
The number of leap seconds for which data is stored in the file.
.It Va tzh_timecnt
The number of
.Dq transition times
for which data is stored in the file.
.It Va tzh_typecnt
The number of
.Dq local time types
for which data is stored in the file (must not be zero).
.It Va tzh_charcnt
The number of characters of "time zone abbreviation strings"
stored in the file.
The above header is followed by
.Va tzh_timecnt
four-byte values of type
.Fa long ,
sorted in ascending order.
These values are written in
.Dq standard
byte order.
Each is used as a transition time (as returned by
.Xr time 3 )
at which the rules for computing local time change.
Next come
.Va tzh_timecnt
one-byte values of type
.Fa unsigned char ;
each one tells which of the different types of
.Dq local time
types described in the file is associated with the same-indexed
transition time.
These values serve as indices into an array of
.Fa ttinfo
structures that appears next in the file;
these structures are defined as follows:
.Bd -literal
struct ttinfo {
	long	tt_gmtoff;
	int	tt_isdst;
	unsigned int	tt_abbrind;
Each structure is written as a four-byte value for
.Va tt_gmtoff
of type
.Fa long ,
in a standard byte order, followed by a one-byte value for
.Va tt_isdst
and a one-byte value for
.Va tt_abbrind .
In each structure,
.Va tt_gmtoff
gives the number of seconds to be added to UTC,
.Va tt_isdst
tells whether
.Va tm_isdst
should be set by
.Xr localtime 3
.Va tt_abbrind
serves as an index into the array of time zone abbreviation characters
that follow the
.Va ttinfo
structure(s) in the file.
Then there are
.Va tzh_leapcnt
pairs of four-byte values, written in standard byte order;
the first value of each pair gives the time
(as returned by
.Xr time 3 )
at which a leap second occurs;
the second gives the
.Em total
number of leap seconds to be applied after the given time.
The pairs of values are sorted in ascending order by time.
Then there are
.Va tzh_ttisstdcnt
standard/wall indicators, each stored as a one-byte value;
they tell whether the transition times associated with local time types
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.
Finally there are
.Va 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.
.Xr localtime 3
uses the first standard-time
.Fa ttinfo
structure in the file
(or simply the first
.Fa ttinfo
structure in the absence of a standard-time structure)
if either
.Va tzh_timecnt
is zero or the time argument is less than the first transition time recorded
in the file.
.Xr ctime 3 ,
.Xr localtime 3 ,
.Xr time 3