Files
amiga-tz/tzfile.5
T

98 lines
2.2 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
.IR settz (3)
1986-08-28 09:04:52 -04:00
begin with bytes reserved for future use,
1986-11-15 14:43:58 -05:00
followed by three four-byte values of type
.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_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
1986-03-02 22:03:34 -05:00
structures that appears next in the file;
these structures are defined as follows:
.in +.5i
.sp
.nf
.ta .5i +\w'unsigned short 'u
struct ttinfo {
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
1986-03-02 22:03:34 -05:00
gives the number of seconds to be added to GMT,
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
1986-03-02 22:03:34 -05:00
serves as an index into the array of time zone abbreviation chaaracters
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
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)
1986-02-15 16:31:20 -05:00
.. %W%