Files
amiga-tz/tzfile.5
T

139 lines
3.6 KiB
Plaintext
Raw Normal View History

1986-02-15 16:30:57 -05:00
.TH TZFILE 5
.SH NAME
tzfile \- time zone information
.SH SYNOPSIS
.B
1986-08-28 09:04:52 -04:00
#include <tzfile.h>
1986-02-15 16:30:57 -05:00
.SH DESCRIPTION
The time zone information files used by
1987-02-21 18:26:20 -05:00
.IR tzset (3)
1997-11-20 17:34:38 -05:00
begin with the magic characters "TZif" to identify then as
time zone information files,
1998-02-28 12:32:24 -05:00
followed by sixteen bytes reserved for future use,
1997-12-18 17:45:41 -05:00
followed by six four-byte values of type
1986-11-15 14:43:58 -05:00
.BR long ,
1986-12-26 22:47:47 -05:00
written in a ``standard'' byte order
(the high-order byte of the value is written first).
These values are,
1986-08-28 09:04:52 -04:00
in order:
.TP
.I tzh_ttisgmtcnt
1997-12-29 09:31:44 -05:00
The number of UTC/local indicators stored in the file.
.TP
1989-03-02 10:35:26 -05:00
.I tzh_ttisstdcnt
The number of standard/wall indicators stored in the file.
.TP
1988-01-25 11:17:17 -05:00
.I tzh_leapcnt
The number of leap seconds for which data is stored in the file.
.TP
1986-08-28 09:04:52 -04:00
.I tzh_timecnt
The number of "transition times" for which data is stored
in the file.
.TP
.I tzh_typecnt
The number of "local time types" for which data is stored
in the file (must not be zero).
.TP
.I tzh_charcnt
The number of characters of "time zone abbreviation strings"
1986-03-02 22:03:34 -05:00
stored in the file.
1986-02-15 16:30:57 -05:00
.PP
1986-03-02 22:03:34 -05:00
The above header is followed by
1986-08-28 09:04:52 -04:00
.I tzh_timecnt
four-byte values of type
1986-03-05 18:57:08 -05:00
.BR long ,
1986-08-28 09:04:52 -04:00
sorted in ascending order.
1986-12-26 22:47:47 -05:00
These values are written in ``standard'' byte order.
1986-08-28 09:04:52 -04:00
Each is used as a transition time (as returned by
1986-03-02 22:03:34 -05:00
.IR time (2))
at which the rules for computing local time change.
Next come
1986-08-28 09:04:52 -04:00
.I tzh_timecnt
one-byte values of type
1986-03-02 22:03:34 -05:00
.BR "unsigned char" ;
1986-12-26 22:47:47 -05:00
each one tells which of the different types of ``local time'' types
described in the file is associated with the same-indexed transition time.
1986-03-02 22:03:34 -05:00
These values serve as indices into an array of
1986-08-28 09:04:52 -04:00
.I ttinfo
1989-03-30 22:02:10 -05:00
structures that appears next in the file;
1986-03-02 22:03:34 -05:00
these structures are defined as follows:
.in +.5i
.sp
.nf
1987-02-21 18:26:20 -05:00
.ta .5i +\w'unsigned int\0\0'u
1989-03-30 22:02:10 -05:00
struct ttinfo {
1986-03-02 22:03:34 -05:00
long tt_gmtoff;
int tt_isdst;
unsigned int tt_abbrind;
};
.in -.5i
.fi
.sp
1986-08-28 09:04:52 -04:00
Each structure is written as a four-byte value for
.I tt_gmtoff
of type
.BR long ,
in a standard byte order, followed by a one-byte value for
.I tt_isdst
and a one-byte value for
.IR tt_abbrind .
1986-03-02 22:03:34 -05:00
In each structure,
1986-08-28 09:04:52 -04:00
.I tt_gmtoff
1997-12-29 09:31:44 -05:00
gives the number of seconds to be added to UTC,
1986-08-28 09:04:52 -04:00
.I tt_isdst
1986-02-15 16:30:57 -05:00
tells whether
1986-08-28 09:04:52 -04:00
.I tm_isdst
1986-02-15 16:30:57 -05:00
should be set by
1987-02-19 08:32:11 -05:00
.I localtime (3)
1986-03-02 22:03:34 -05:00
and
1986-08-28 09:04:52 -04:00
.I tt_abbrind
1987-02-21 17:27:47 -05:00
serves as an index into the array of time zone abbreviation characters
1986-03-02 22:03:34 -05:00
that follow the
1986-08-28 09:04:52 -04:00
.I ttinfo
1986-03-02 22:03:34 -05:00
structure(s) in the file.
1986-02-15 16:30:57 -05:00
.PP
1989-03-02 10:35:26 -05:00
Then there are
1988-01-25 11:17:17 -05:00
.I tzh_leapcnt
pairs of four-byte values, written in standard byte order;
the first value of each pair gives the time
1989-03-30 22:02:10 -05:00
(as returned by
1988-01-25 11:17:17 -05:00
.IR time(2))
at which a leap second occurs;
the second gives the
.I total
number of leap seconds to be applied after the given time.
The pairs of values are sorted in ascending order by time.
.PP
Then there are
1989-03-02 10:35:26 -05:00
.I 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.
.PP
1997-12-18 17:45:41 -05:00
Finally there are
.I tzh_ttisgmtcnt
1997-12-29 09:31:44 -05:00
UTC/local indicators, each stored as a one-byte value;
they tell whether the transition times associated with local time types
1997-12-29 09:31:44 -05:00
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
1987-02-19 08:32:11 -05:00
.I Localtime
1986-11-24 16:37:56 -05:00
uses the first standard-time
1986-08-28 09:04:52 -04:00
.I ttinfo
1986-03-02 22:03:34 -05:00
structure in the file
1986-11-24 16:37:56 -05:00
(or simply the first
.I ttinfo
structure in the absence of a standard-time structure)
1986-02-15 16:30:57 -05:00
if either
1986-08-28 09:04:52 -04:00
.I tzh_timecnt
1987-02-19 08:32:11 -05:00
is zero or the time argument is less than the first transition time recorded
in the file.
1986-02-15 16:30:57 -05:00
.SH SEE ALSO
1986-12-26 22:47:47 -05:00
newctime(3)
1992-11-04 13:08:00 -05:00
.\" %W%
1996-06-05 08:02:00 -04:00
.\" This file is in the public domain, so clarified as of
2005-12-08 11:35:32 -05:00
.\" 1996-06-05 by Arthur David Olson.