Files
amiga-tz/tzfile.5
T

107 lines
2.0 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
#include "tzfile.h"
.SH DESCRIPTION
The time zone information files used by
.IR settz (3)
and
.IR newlocaltime (3)
1986-03-02 22:03:34 -05:00
begin with a
1986-02-15 16:30:57 -05:00
.I tzinfo
1986-03-02 22:03:34 -05:00
structure (as defined in the include file
1986-02-15 16:30:57 -05:00
.B
1986-03-02 22:03:34 -05:00
"tzfile.h"\c
):
1986-02-15 16:30:57 -05:00
.sp
.nf
.in +.5i
1986-03-02 22:03:34 -05:00
.ta .5i +\w'unsigned short 'u
struct tzhead {
char tzh_reserved[14];
unsigned short tzh_timecnt;
unsigned short tzh_typecnt;
unsigned short tzh_charcnt;
1986-02-15 16:30:57 -05:00
};
1986-03-02 22:03:34 -05:00
.in -.5i
1986-02-15 16:30:57 -05:00
.fi
.PP
The
1986-03-02 22:03:34 -05:00
.B tzh_reserved
element is currently unused.
The
.B tzh_timecnt
element gives the number of "transition times" for which data is stored
in the file;
the
.B tzh_typecnt
(which must not be zero)
element gives the number of "local time types" for which data is stored
in the file;
and the
.B tzh_charcnt
element gives the number of characters of "time zone abbreviation strings"
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
.B tzh_timecnt
values of type
.BR long ;
each is used as a transition time (as returned by
.IR time (2))
at which the rules for computing local time change.
Next come
.B tzh_timecnt
values of type
.BR "unsigned char" ;
each one tells which of the different types of "local time" described in the
file is associated with the same-indexed transition time.
These values serve as indices into an array of
.B ttinfo
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
In each structure,
.B tt_gmtoff
gives the number of seconds to be added to GMT,
1986-02-15 16:30:57 -05:00
.B
1986-03-02 22:03:34 -05:00
tt_isdst
1986-02-15 16:30:57 -05:00
tells whether
.B
tm_isdst
should be set by
1986-03-02 22:03:34 -05:00
.IR newlocaltime (3),
and
.B tt_abbrind
serves as an index into the array of time zone abbreviation chaaracters
that follow the
.B ttinfo
structure(s) in the file.
1986-02-15 16:30:57 -05:00
.PP
.I Newlocaltime
1986-03-02 22:03:34 -05:00
uses the first
.B ttinfo
structure in the file
1986-02-15 16:30:57 -05:00
if either
1986-03-02 22:03:34 -05:00
.B tzh_timecnt
1986-02-15 16:30:57 -05:00
is zero or
.IR newlocaltime 's
argument is less than
1986-03-02 22:03:34 -05:00
the first transition time recorded in the file.
1986-02-15 16:30:57 -05:00
.SH SEE ALSO
settz(3)
1986-02-15 16:31:20 -05:00
.. %W%