2013-03-10 09:28:48 +00:00
|
|
|
.\" %%%LICENSE_START(PUBLIC_DOMAIN)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" This file is in the public domain, so clarified as of
|
|
|
|
.\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
|
2013-03-10 09:28:48 +00:00
|
|
|
.\" %%%LICENSE_END
|
ldd.1, capget.2, clone.2, create_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_thread_area.2, getcpu.2, getitimer.2, getpid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_list.2, mkdir.2, mknod.2, pciconfig_read.2, pivot_root.2, posix_fadvise.2, query_module.2, sendfile.2, set_thread_area.2, setns.2, unshare.2, __setfpucw.3, a64l.3, addseverity.3, argz_add.3, bindresvport.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, ccos.3, ccosh.3, cerf.3, cexp.3, cexp2.3, cimag.3, clog.3, clog10.3, clog2.3, cmsg.3, conj.3, cpow.3, cproj.3, creal.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, des_crypt.3, envz_add.3, fdim.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmtmsg.3, fpclassify.3, gamma.3, getpt.3, getrpcent.3, getrpcport.3, getttyent.3, isgreater.3, key_setsecret.3, lgamma.3, malloc_hook.3, mempcpy.3, nan.3, netlink.3, nextafter.3, putgrent.3, remove.3, remquo.3, rpc.3, rtime.3, rtnetlink.3, setaliasent.3, setnetgrent.3, signbit.3, significand.3, sincos.3, stdin.3, tgamma.3, xcrypt.3, xdr.3, cciss.4, hpsa.4, mouse.4, pts.4, sk98lin.4, tty_ioctl.4, wavelan.4, hosts.equiv.5, rpc.5, tzfile.5, boot.7, complex.7, ddp.7, fifo.7, futex.7, icmp.7, ip.7, ipv6.7, netdevice.7, netlink.7, packet.7, raw.7, rtnetlink.7, socket.7, tcp.7, udp.7, unix.7, x25.7, sync.8: Global fix: Put copyright info at top of page, followed by blank line and LICENSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:51 +00:00
|
|
|
.\"
|
|
|
|
.\" @(#)tzfile.5 7.11
|
|
|
|
.\"
|
2017-08-05 03:25:21 +00:00
|
|
|
.TH TZFILE 5 2017-08-04 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2017-08-11 10:26:01 +00:00
|
|
|
tzfile \- timezone information
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
2017-08-05 03:25:21 +00:00
|
|
|
.ie '\(lq'' .ds lq \&"\"
|
|
|
|
.el .ds lq \(lq\"
|
|
|
|
.ie '\(rq'' .ds rq \&"\"
|
|
|
|
.el .ds rq \(rq\"
|
|
|
|
.de q
|
|
|
|
\\$3\*(lq\\$1\*(rq\\$2
|
|
|
|
..
|
2017-08-11 10:26:01 +00:00
|
|
|
The timezone information files used by
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR tzset (3)
|
|
|
|
are typically found under a directory with a name like
|
2012-05-03 18:52:26 +00:00
|
|
|
.IR /usr/share/zoneinfo .
|
2017-08-05 03:25:21 +00:00
|
|
|
These files begin with a 44-byte header containing the following fields:
|
|
|
|
.IP * 2
|
|
|
|
The magic four-byte ASCII sequence
|
|
|
|
.q "TZif"
|
2017-08-11 10:26:01 +00:00
|
|
|
identifies the file as a timezone information file.
|
2015-05-02 07:59:01 +00:00
|
|
|
.IP *
|
2017-08-05 03:25:21 +00:00
|
|
|
A byte identifying the version of the file's format
|
|
|
|
(as of 2017, either an ASCII NUL, or
|
|
|
|
.q "2",
|
|
|
|
or
|
|
|
|
.q "3" ).
|
2015-05-02 07:59:01 +00:00
|
|
|
.IP *
|
|
|
|
Fifteen bytes containing zeros reserved for future use.
|
|
|
|
.IP *
|
2017-08-05 03:25:21 +00:00
|
|
|
Six four-byte integer values
|
|
|
|
written in a standard byte order
|
2004-11-03 13:51:07 +00:00
|
|
|
(the high-order byte of the value is written first).
|
|
|
|
These values are,
|
|
|
|
in order:
|
2015-05-02 07:59:01 +00:00
|
|
|
.RS
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_ttisgmtcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of UT/local indicators stored in the file.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_ttisstdcnt
|
|
|
|
The number of standard/wall indicators stored in the file.
|
|
|
|
.TP
|
|
|
|
.I tzh_leapcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of leap seconds for which data entries are stored in the file.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of transition times for which data entries are stored
|
2004-11-03 13:51:07 +00:00
|
|
|
in the file.
|
|
|
|
.TP
|
|
|
|
.I tzh_typecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of local time types for which data entries are stored
|
2004-11-03 13:51:07 +00:00
|
|
|
in the file (must not be zero).
|
|
|
|
.TP
|
|
|
|
.I tzh_charcnt
|
2017-08-11 10:26:01 +00:00
|
|
|
The number of bytes of timezone abbreviation strings
|
2004-11-03 13:51:07 +00:00
|
|
|
stored in the file.
|
2015-05-02 07:59:01 +00:00
|
|
|
.RE
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
The above header is followed by the following fields, whose lengths
|
|
|
|
vary depend on the contents of the header:
|
|
|
|
.IP * 2
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
four-byte signed integer values sorted in ascending order.
|
|
|
|
These values are written in standard byte order.
|
2004-11-03 13:51:07 +00:00
|
|
|
Each is used as a transition time (as returned by
|
|
|
|
.BR time (2))
|
|
|
|
at which the rules for computing local time change.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
one-byte unsigned integer values;
|
|
|
|
each one tells which of the different types of local time types
|
|
|
|
described in the file is associated with the time period
|
|
|
|
starting with the same-indexed transition time.
|
|
|
|
These values serve as indices into the next field.
|
|
|
|
.IP *
|
2010-08-31 05:49:34 +00:00
|
|
|
.I tzh_typecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
.I ttinfo
|
|
|
|
entries, each defined as follows:
|
|
|
|
.in +.5i
|
2004-11-03 13:51:07 +00:00
|
|
|
.sp
|
|
|
|
.nf
|
2017-08-05 03:25:21 +00:00
|
|
|
.ta .5i +\w'unsigned char\0\0'u
|
2004-11-03 13:51:07 +00:00
|
|
|
struct ttinfo {
|
2017-08-05 03:25:21 +00:00
|
|
|
int32_t tt_gmtoff;
|
|
|
|
unsigned char tt_isdst;
|
|
|
|
unsigned char tt_abbrind;
|
2004-11-03 13:51:07 +00:00
|
|
|
};
|
2017-08-05 03:25:21 +00:00
|
|
|
.in -.5i
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
|
|
|
.sp
|
2017-08-05 03:25:21 +00:00
|
|
|
Each structure is written as a four-byte signed integer value for
|
|
|
|
.IR tt_gmtoff ,
|
2004-11-03 13:51:07 +00:00
|
|
|
in a standard byte order, followed by a one-byte value for
|
|
|
|
.I tt_isdst
|
|
|
|
and a one-byte value for
|
|
|
|
.IR tt_abbrind .
|
|
|
|
In each structure,
|
|
|
|
.I tt_gmtoff
|
2017-08-05 03:25:21 +00:00
|
|
|
gives the number of seconds to be added to UT,
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tt_isdst
|
|
|
|
tells whether
|
|
|
|
.I tm_isdst
|
|
|
|
should be set by
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR localtime (3)
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
|
|
|
.I tt_abbrind
|
2017-08-11 10:26:01 +00:00
|
|
|
serves as an index into the array of timezone abbreviation bytes
|
2004-11-03 13:51:07 +00:00
|
|
|
that follow the
|
|
|
|
.I ttinfo
|
|
|
|
structure(s) in the file.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_leapcnt
|
|
|
|
pairs of four-byte values, written in standard byte order;
|
2017-08-05 03:25:21 +00:00
|
|
|
the first value of each pair gives the nonnegative time
|
2004-11-03 13:51:07 +00:00
|
|
|
(as returned by
|
|
|
|
.BR time (2))
|
|
|
|
at which a leap second occurs;
|
|
|
|
the second gives the
|
|
|
|
.I total
|
2017-08-05 03:25:21 +00:00
|
|
|
number of leap seconds to be applied during the time period
|
|
|
|
starting at the given time.
|
2004-11-03 13:51:07 +00:00
|
|
|
The pairs of values are sorted in ascending order by time.
|
2017-08-05 03:25:21 +00:00
|
|
|
Each transition is for one leap second, either positive or negative;
|
|
|
|
transitions always separated by at least 28 days minus 1 second.
|
|
|
|
.IP *
|
2004-11-03 13:51:07 +00: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,
|
2017-08-11 10:26:01 +00:00
|
|
|
and are used when a timezone file is used in handling POSIX-style
|
|
|
|
timezone environment variables.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_ttisgmtcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
UT/local indicators, each stored as a one-byte value;
|
2004-11-03 13:51:07 +00:00
|
|
|
they tell whether the transition times associated with local time types
|
2017-08-05 03:25:21 +00:00
|
|
|
were specified as UT or local time,
|
2017-08-11 10:26:01 +00:00
|
|
|
and are used when a timezone file is used in handling POSIX-style
|
|
|
|
timezone environment variables.
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
The
|
2010-08-31 05:49:34 +00:00
|
|
|
.BR localtime (3)
|
2017-08-05 03:25:21 +00:00
|
|
|
function
|
2004-11-03 13:51:07 +00:00
|
|
|
uses the first standard-time
|
|
|
|
.I ttinfo
|
|
|
|
structure in the file
|
|
|
|
(or simply the first
|
|
|
|
.I ttinfo
|
|
|
|
structure in the absence of a standard-time structure)
|
|
|
|
if either
|
|
|
|
.I tzh_timecnt
|
|
|
|
is zero or the time argument is less than the first transition time recorded
|
|
|
|
in the file.
|
2015-05-02 07:54:33 +00:00
|
|
|
.SS Version 2 format
|
2017-08-11 10:26:01 +00:00
|
|
|
For version-2-format timezone files,
|
2017-08-05 03:25:21 +00:00
|
|
|
the above header and data are followed by a second header and data,
|
2010-08-31 05:49:34 +00:00
|
|
|
identical in format except that
|
2017-08-05 03:25:21 +00:00
|
|
|
eight bytes are used for each transition time or leap second time.
|
|
|
|
(Leap second counts remain four bytes.)
|
2010-08-31 05:49:34 +00:00
|
|
|
After the second header and data comes a newline-enclosed,
|
|
|
|
POSIX-TZ-environment-variable-style string for use in handling instants
|
|
|
|
after the last transition time stored in the file
|
|
|
|
(with nothing between the newlines if there is no POSIX representation for
|
|
|
|
such instants).
|
2017-08-05 03:25:21 +00:00
|
|
|
The POSIX-style string must agree with the local time type after
|
|
|
|
both data's last transition times; for example, given the string
|
|
|
|
.q "WET0WEST,M3.5.0,M10.5.0/3"
|
|
|
|
then if a last transition time is in July, the transition's local time
|
|
|
|
type must specify a daylight-saving time abbreviated
|
|
|
|
.q "WEST"
|
|
|
|
that is one hour east of UT.
|
|
|
|
.SS Version 3 format
|
2017-08-11 10:26:01 +00:00
|
|
|
For version-3-format timezone files, the POSIX-TZ-style string may
|
2017-08-05 03:25:21 +00:00
|
|
|
use two minor extensions to the POSIX TZ format, as described in
|
2017-08-12 09:20:10 +00:00
|
|
|
.BR newtzset (3).
|
2017-08-05 03:25:21 +00:00
|
|
|
First, the hours part of its transition times may be signed and range from
|
|
|
|
\-167 through 167 instead of the POSIX-required unsigned values
|
2017-08-11 10:26:01 +00:00
|
|
|
from 0 through 24.
|
|
|
|
Second, DST is in effect all year if it starts
|
2017-08-05 03:25:21 +00:00
|
|
|
January 1 at 00:00 and ends December 31 at 24:00 plus the difference
|
|
|
|
between daylight saving and standard time.
|
2015-05-02 07:54:33 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
Future changes to the format may append more data.
|
2010-08-31 05:49:34 +00:00
|
|
|
.SH SEE ALSO
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR time (2),
|
|
|
|
.BR localtime (3),
|
2012-05-03 18:47:45 +00:00
|
|
|
.BR tzset (3),
|
2012-05-03 18:56:57 +00:00
|
|
|
.BR tzselect (8),
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR zdump (8),
|
|
|
|
.BR zic (8)
|
|
|
|
.\" This file is in the public domain, so clarified as of
|
|
|
|
.\" 1996-06-05 by Arthur David Olson.
|