1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2026-05-07 00:51:16 +00:00

file format change

SCCS-file: tzfile.5
SCCS-SID: 1.5
This commit is contained in:
Arthur David Olson
1986-03-02 22:03:34 -05:00
committed by Paul Eggert
parent 73a47de4fe
commit 0dcdfce628

118
tzfile.5
View File

@@ -9,74 +9,98 @@ The time zone information files used by
.IR settz (3) .IR settz (3)
and and
.IR newlocaltime (3) .IR newlocaltime (3)
have the format of the begin with a
.I tzinfo .I tzinfo
structure described in the include file structure (as defined in the include file
.B .B
"tzfile.h": "tzfile.h"\c
):
.sp .sp
.nf .nf
.in +.5i .in +.5i
struct tzinfo { .ta .5i +\w'unsigned short 'u
int tz_timecnt; struct tzhead {
long tz_times[TZ_MAX_TIMES]; char tzh_reserved[14];
char tz_types[TZ_MAX_TIMES]; unsigned short tzh_timecnt;
struct dsinfo { unsigned short tzh_typecnt;
long ds_gmtoff; unsigned short tzh_charcnt;
char ds_abbr[TZ_ABBR_LEN+1];
char ds_isdst;
} tz_dsinfo[TZ_MAX_TYPES];
}; };
.in -.5i
.fi .fi
.PP .PP
The The
.B tz_timecnt .B tzh_reserved
field tells how many of the element is currently unused.
.B tz_times The
and .B tzh_timecnt
.B tz_types element gives the number of "transition times" for which data is stored
stored in the file are meaningful. in the file;
Each of the meaningful the
.B tz_times .B tzh_typecnt
entries is a starting time (as returned by (which must not be zero)
.IR time (2)); element gives the number of "local time types" for which data is stored
the same-indexed in the file;
.B tz_types and the
entry is the index of the .B tzh_charcnt
.B tz_dsinfo element gives the number of characters of "time zone abbreviation strings"
array element that tells about how "local time" is generated starting at that stored in the file.
time.
For a file to be used by
.IR settz ,
its
.B tz_times
entries must be sorted in ascending order.
.PP .PP
In the The above header is followed by
.B tz_dsinfo .B tzh_timecnt
structures, values of type
.B ds_gmtoff .BR long ;
gives the number of seconds that should be added to GMT; each is used as a transition time (as returned by
.B ds_abbr .IR time (2))
is the ASCII-NUL-terminated string used as the time zone abbreviation; at which the rules for computing local time change.
and 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,
.B .B
ds_isdst tt_isdst
tells whether tells whether
.B .B
tm_isdst tm_isdst
should be set by should be set by
.IR newlocaltime (3). .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.
.PP .PP
.I Newlocaltime .I Newlocaltime
uses the first element of uses the first
.B tz_dsinfo .B ttinfo
structure in the file
if either if either
.B tz_timecnt .B tzh_timecnt
is zero or is zero or
.IR newlocaltime 's .IR newlocaltime 's
argument is less than argument is less than
.BR tz_times[0] . the first transition time recorded in the file.
.SH SEE ALSO .SH SEE ALSO
settz(3) settz(3)
.. %W% .. %W%