]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man5/tzfile.5
tzfile.5: tfix
[thirdparty/man-pages.git] / man5 / tzfile.5
index 115cdc126e1b0c2befa095602646023dd4aef4dc..b76fa717b9995a1b5c4974dde75f82d4c3fb9e0e 100644 (file)
@@ -3,8 +3,6 @@
 .\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
 .\" %%%LICENSE_END
 .\"
-.\" @(#)tzfile.5       7.11
-.\"
 .TH TZFILE 5 2017-08-04 "" "Linux Programmer's Manual"
 .SH NAME
 tzfile \- timezone information
@@ -59,12 +57,12 @@ The number of local time types for which data entries are stored
 in the file (must not be zero).
 .TP
 .I tzh_charcnt
-The number of bytes of timezone abbreviation strings
+The number of bytes of time zone abbreviation strings
 stored in the file.
 .RE
 .PP
 The above header is followed by the following fields, whose lengths
-vary depend on the contents of the header:
+depend on the contents of the header:
 .IP * 2
 .I tzh_timecnt
 four-byte signed integer values sorted in ascending order.
@@ -75,9 +73,12 @@ at which the rules for computing local time change.
 .IP *
 .I tzh_timecnt
 one-byte unsigned integer values;
-each one tells which of the different types of local time types
+each one but the last 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.
+starting with the same-indexed transition time
+and continuing up to but not including the next transition time.
+(The last time type is present only for consistency checking with the
+POSIX-style TZ string described below.)
 These values serve as indices into the next field.
 .IP *
 .I tzh_typecnt
@@ -111,7 +112,7 @@ should be set by
 .BR localtime (3)
 and
 .I tt_abbrind
-serves as an index into the array of timezone abbreviation bytes
+serves as an index into the array of time zone abbreviation bytes
 that follow the
 .I ttinfo
 structure(s) in the file.
@@ -166,19 +167,24 @@ 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).
-The POSIX-style string must agree with the local time type after
-both data's last transition times; for example, given the string
+or for all instants if the file has no transitions.
+The POSIX-style TZ string is empty (i.e., nothing between the newlines)
+if there is no POSIX representation for such instants.
+If nonempty, the POSIX-style TZ string must agree with the local time
+type after the last transition time if present in the eight-byte data;
+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.
+Also, if there is at least one transition, time type 0 is associated
+with the time period from the indefinite past up to but not including
+the earliest transition time.
 .SS Version 3 format
 For version-3-format timezone files, the POSIX-TZ-style string may
 use two minor extensions to the POSIX TZ format, as described in
-.IR newtzset (3).
+.BR newtzset (3).
 First, the hours part of its transition times may be signed and range from
 \-167 through 167 instead of the POSIX-required unsigned values
 from 0 through 24.