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)
|
|
|
|
|
have the format of the
|
|
|
|
|
.I tzinfo
|
|
|
|
|
structure described in the include file
|
|
|
|
|
.B
|
|
|
|
|
"tzfile.h":
|
|
|
|
|
.sp
|
|
|
|
|
.nf
|
|
|
|
|
.in +.5i
|
|
|
|
|
.ta .5i +\w'struct dsinfo 'u
|
|
|
|
|
struct dsinfo {
|
|
|
|
|
long ds_gmtoff;
|
|
|
|
|
char ds_abbr[TZ_ABBR_LEN+1];
|
|
|
|
|
char ds_isdst;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct tzinfo {
|
|
|
|
|
int tz_timecnt;
|
|
|
|
|
long tz_times[TZ_MAX_TIMES];
|
|
|
|
|
char tz_types[TZ_MAX_TIMES];
|
|
|
|
|
struct dsinfo tz_dsinfo[TZ_MAX_TYPES];
|
|
|
|
|
};
|
|
|
|
|
.fi
|
|
|
|
|
.PP
|
|
|
|
|
The
|
|
|
|
|
.B tz_timecnt
|
|
|
|
|
field tells how many of the
|
|
|
|
|
.B tz_times
|
|
|
|
|
and
|
|
|
|
|
.B tz_types
|
|
|
|
|
stored in the file are meaningful.
|
|
|
|
|
Each of the meaningful
|
|
|
|
|
.B tz_times
|
|
|
|
|
entries is a starting time (as returned by
|
|
|
|
|
.IR time (2));
|
|
|
|
|
the same-indexed
|
|
|
|
|
.B tz_types
|
|
|
|
|
entry is the index of the
|
|
|
|
|
.B tz_dsinfo
|
|
|
|
|
array element that tells about how "local time" is generated starting at that
|
|
|
|
|
time.
|
|
|
|
|
For a file to be used by
|
|
|
|
|
.IR settz ,
|
|
|
|
|
its
|
|
|
|
|
.B tz_times
|
|
|
|
|
entries must be sorted in ascending order.
|
|
|
|
|
.PP
|
|
|
|
|
In the
|
|
|
|
|
.B tz_dsinfo
|
|
|
|
|
structures,
|
|
|
|
|
.B ds_gmtoff
|
|
|
|
|
gives the number of seconds that should be added to GMT;
|
|
|
|
|
.B ds_abbr
|
|
|
|
|
is the ASCII-NUL-terminated string used as the time zone abbreviation;
|
|
|
|
|
and
|
|
|
|
|
.B
|
|
|
|
|
ds_isdst
|
|
|
|
|
tells whether
|
|
|
|
|
.B
|
|
|
|
|
tm_isdst
|
|
|
|
|
should be set by
|
|
|
|
|
.IR newlocaltime (3).
|
|
|
|
|
.PP
|
|
|
|
|
.I Newlocaltime
|
|
|
|
|
uses the first element of
|
|
|
|
|
.B tz_dsinfo
|
|
|
|
|
if either
|
|
|
|
|
.B tz_timecnt
|
|
|
|
|
is zero or
|
|
|
|
|
.IR newlocaltime 's
|
|
|
|
|
argument is less than
|
|
|
|
|
.BR tz_times[0] .
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
settz(3)
|