tzfile.5: Add information on version 2 format timezone files

Updated using information from the tzcode 2010l release at
ftp://elsie.nci.nih.gov/pub.
(It's an open question whether or not a version of tzfile.5
should live independently in man-pages. It was added to the
man-pages set many years ago. For now, I'll follow a
conservative course that causes least pain to downstream,
by continuing to maintain a separate copy in man-pages.)

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594219

Reported-by: Yitzchak Gale <gale@sefer.org>
Signed-off-by: Michael Kerrisk <mtk@konstanz.(none)>
This commit is contained in:
Michael Kerrisk 2010-08-31 07:49:34 +02:00
parent 26ae585e9b
commit 64fb5aedb0
1 changed files with 20 additions and 4 deletions

View File

@ -1,7 +1,7 @@
.\" @(#)tzfile.5 7.11
.\" This file is in the public domain, so clarified as of
.\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
.TH TZFILE 5 1996-06-05 "" "Linux Programmer's Manual"
.TH TZFILE 5 2010-08-31 "" "Linux Programmer's Manual"
.SH NAME
tzfile \- timezone information
.SH SYNOPSIS
@ -11,7 +11,9 @@ The timezone information files used by
.BR tzset (3)
begin with the magic characters "TZif" to identify then as
timezone information files,
followed by sixteen bytes reserved for future use,
followed by a character identifying the version of the file's format
(as of 2005, either an ASCII NUL ('\\0') or a '2')
followed by fifteen bytes containing zeroes reserved for future use,
followed by six four-byte values of type
.IR long ,
written in a "standard" byte order
@ -57,7 +59,9 @@ each one tells which of the different types of "local time" types
described in the file is associated with the same-indexed transition time.
These values serve as indices into an array of
.I ttinfo
structures that appears next in the file;
structures (with
.I tzh_typecnt
entries) that appear next in the file;
these structures are defined as follows:
.in +4n
.sp
@ -121,7 +125,7 @@ were specified as UTC or local time,
and are used when a timezone file is used in handling POSIX-style
timezone environment variables.
.PP
.I Localtime
.BR localtime (3)
uses the first standard-time
.I ttinfo
structure in the file
@ -132,3 +136,15 @@ if either
.I tzh_timecnt
is zero or the time argument is less than the first transition time recorded
in the file.
.PP
For version-2-format timezone files,
the above header and data is followed by a second header and data,
identical in format except that
eight bytes are used for each transition time or leap-second time.
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).
.SH SEE ALSO
.BR ctime (3)