-.\" @(#)tzfile.5 7.11
+.\" %%%LICENSE_START(PUBLIC_DOMAIN)
.\" 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"
+.\" %%%LICENSE_END
+.\"
+.\" @(#)tzfile.5 7.11
+.\"
+.TH TZFILE 5 2012-05-04 "" "Linux Programmer's Manual"
.SH NAME
tzfile \- timezone information
-.SH SYNOPSIS
-.B #include <tzfile.h>
.SH DESCRIPTION
-The timezone information files used by
-.BR tzset (3)
-begin with the magic characters "TZif" to identify then as
+This page describes the structure of the timezone files used by
+.BR tzset (3).
+These files are typically found under one of the directories
+.IR /usr/lib/zoneinfo
+or
+.IR /usr/share/zoneinfo .
+
+Timezone information files
+begin with the magic characters "TZif" to identify them 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 (\(aq\\0\(aq) or a \(aq2\(aq)
+followed by fifteen bytes containing zeros reserved for future use,
followed by six four-byte values of type
.IR long ,
written in a "standard" byte order
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
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
.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),
+.BR tzset (3),
+.BR tzselect (8),
+
+.I timezone/tzfile.h
+in the glibc source tree
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.