summaryrefslogtreecommitdiffstats
path: root/man8
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-03-09 01:20:24 +0100
committerAlejandro Colomar <alx@kernel.org>2023-03-09 16:56:25 +0100
commit1349d7ca558355955923429e75c632125a72ee89 (patch)
tree4aa1a2dae617282b85fa5280c3aa9e3061185c7a /man8
parentdb045ad2793965a24d7905eecd9ff67c9a8fb004 (diff)
tzfile.5, tzselect.8, zdump.8, zic.8: sync pages from tzdb
Cc: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man8')
-rw-r--r--man8/tzselect.85
-rw-r--r--man8/zdump.851
-rw-r--r--man8/zic.8262
3 files changed, 215 insertions, 103 deletions
diff --git a/man8/tzselect.8 b/man8/tzselect.8
index 3b69587f3..4578090f9 100644
--- a/man8/tzselect.8
+++ b/man8/tzselect.8
@@ -1,9 +1,6 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
.\" This file is in the public domain, so clarified as of
.\" 2009-05-17 by Arthur David Olson.
-.\" %%%LICENSE_END
-.\"
-.TH tzselect 8 (date) "Linux man-pages (unreleased)"
+.TH tzselect 8 "" "Time Zone Database"
.SH NAME
tzselect \- select a timezone
.SH SYNOPSIS
diff --git a/man8/zdump.8 b/man8/zdump.8
index 27d8310ca..f77c0c798 100644
--- a/man8/zdump.8
+++ b/man8/zdump.8
@@ -1,8 +1,6 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
-.\" This page is in the public domain
-.\" %%%LICENSE_END
-.\"
-.TH zdump 8 2020-04-27 "" "Linux System Administration"
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
+.TH zdump 8 "" "Time Zone Database"
.SH NAME
zdump \- timezone dumper
.SH SYNOPSIS
@@ -13,15 +11,15 @@ zdump \- timezone dumper
.I timezone
\&... ]
.SH DESCRIPTION
-.ie '\[lq]'' .ds lq \&"\"
-.el .ds lq \[lq]\"
-.ie '\[rq]'' .ds rq \&"\"
-.el .ds rq \[rq]\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
.de q
\\$3\*(lq\\$1\*(rq\\$2
..
-.ie \n(.g .ds - \f(CW-\fP
-.el ds - \-
+.ie \n(.g .ds - \f(CR-\fP
+.el .ds - \-
The
.B zdump
program prints the current time in each
@@ -48,12 +46,14 @@ Output a verbose description of time intervals.
For each
.I timezone
on the command line,
-print the time at the lowest possible time value,
-the time one day after the lowest possible time value,
+print the times at the two extreme time values,
+the times (if present) at and just beyond the boundaries of years that
+.BR localtime (3)
+and
+.BR gmtime (3)
+can represent, and
the times both one second before and exactly at
-each detected time discontinuity,
-the time at one day less than the highest possible time value,
-and the time at the highest possible time value.
+each detected time discontinuity.
Each line is followed by
.BI isdst= D
where
@@ -70,7 +70,7 @@ seconds east of Greenwich.
.B \*-V
Like
.BR \*-v ,
-except omit the times relative to the extreme time values.
+except omit output concerning extreme time and year values.
This generates output that is easier to compare to that of
implementations with different time representations.
.TP
@@ -79,10 +79,10 @@ Cut off interval output at the given year(s).
Cutoff times are computed using the proleptic Gregorian calendar with year 0
and with Universal Time (UT) ignoring leap seconds.
Cutoffs are at the start of each year, where the lower-bound
-timestamp is exclusive and the upper is inclusive; for example,
+timestamp is inclusive and the upper is exclusive; for example,
.B "\*-c 1970,2070"
-selects transitions after 1970-01-01 00:00:00 UTC
-and on or before 2070-01-01 00:00:00 UTC.
+selects transitions on or after 1970-01-01 00:00:00 UTC
+and before 2070-01-01 00:00:00 UTC.
The default cutoff is
.BR \*-500,2500 .
.TP
@@ -95,7 +95,7 @@ The
determines whether the count includes leap seconds.
As with
.BR \*-c ,
-the cutoff's lower bound is exclusive and its upper bound is inclusive.
+the cutoff's lower bound is inclusive and its upper bound is exclusive.
.SH "INTERVAL FORMAT"
The interval format is a compact text representation that is intended
to be both human- and machine-readable. It consists of an empty line,
@@ -151,7 +151,7 @@ Here is an example of the output, with the leading empty line omitted.
tabbed columns line up.)
.nf
.sp
-.if \n(.g .ft CW
+.if \n(.g .ft CR
.if t .in +.5i
.if n .in +2
.nr w \w'1896-01-13 'u+\n(.i
@@ -184,7 +184,7 @@ UT, a standard time abbreviated HST.
Here are excerpts from another example:
.nf
.sp
-.if \n(.g .ft CW
+.if \n(.g .ft CR
.if t .in +.5i
.if n .in +2
TZ="Europe/Astrakhan"
@@ -204,7 +204,8 @@ This time zone is east of UT, so its UT offsets are positive. Also,
many of its time zone abbreviations are omitted since they duplicate
the text of the UT offset.
.SH LIMITATIONS
-Time discontinuities are found by sampling the results returned by localtime
+Time discontinuities are found by sampling the results returned by
+.BR localtime (3)
at twelve-hour intervals.
This works in all real-world cases;
one can construct artificial time zones for which this fails.
@@ -228,5 +229,3 @@ introduction of UTC is problematic.
.SH SEE ALSO
.BR tzfile (5),
.BR zic (8)
-.\" This file is in the public domain, so clarified as of
-.\" 2009-05-17 by Arthur David Olson.
diff --git a/man8/zic.8 b/man8/zic.8
index 99e28f50e..c467efefe 100644
--- a/man8/zic.8
+++ b/man8/zic.8
@@ -1,8 +1,6 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
-.\" This page is in the public domain
-.\" %%%LICENSE_END
-.\"
-.TH zic 8 2020-08-13 "" "Linux System Administration"
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
+.TH zic 8 "" "Time Zone Database"
.SH NAME
zic \- timezone compiler
.SH SYNOPSIS
@@ -13,10 +11,10 @@ zic \- timezone compiler
.I filename
\&... ]
.SH DESCRIPTION
-.ie '\[lq]'' .ds lq \&"\"
-.el .ds lq \[lq]\"
-.ie '\[rq]'' .ds rq \&"\"
-.el .ds rq \[rq]\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
.de q
\\$3\*(lq\\$1\*(rq\\$2
..
@@ -26,16 +24,29 @@ zic \- timezone compiler
.el .ds > \(ra
.ie \n(.g \{\
. ds : \:
-. ds - \f(CW-\fP
+. ds - \f(CR-\fP
.\}
.el \{\
. ds :
. ds - \-
.\}
+.ds d " degrees
+.ds m " minutes
+.ds s " seconds
+.ds _ " \&
+.if t \{\
+. if \n(.g .if c \(de .if c \(fm .if c \(sd \{\
+. ds d \(de
+. ds m \(fm
+. ds s \(sd
+. ds _ \|
+. \}
+.\}
The
.B zic
program reads text from the file(s) named on the command line
-and creates the time conversion information files specified in this input.
+and creates the timezone information format (TZif) files
+specified in this input.
If a
.I filename
is
@@ -65,15 +76,13 @@ is
.BR slim ,
keep the output files small; this can help check for the bugs
and incompatibilities.
-Although the default is currently
-.BR fat ,
-this is intended to change in future
-.B zic
-versions, as software that mishandles the 64-bit data typically
+The default is
+.BR slim ,
+as software that mishandles 64-bit data typically
mishandles timestamps after the year 2038 anyway.
Also see the
.B \*-r
-option for another way to shrink output size.
+option for another way to alter output size.
.TP
.BI "\*-d " directory
Create time conversion information files in the named directory rather than
@@ -89,6 +98,12 @@ will act as if the input contained a link line of the form
.ti +.5i
.ta \w'Link\0\0'u +\w'\fItimezone\fP\0\0'u
Link \fItimezone\fP localtime
+.sp
+If
+.I timezone
+is
+.BR \*- ,
+any already-existing link is removed.
.TP
.BI "\*-L " leapsecondfilename
Read leap second information from the file with the given name.
@@ -106,16 +121,25 @@ will act as if the input contained a link line of the form
.ti +.5i
Link \fItimezone\fP posixrules
.sp
-This feature is obsolete and poorly supported.
+Unless
+.I timezone is
+.q "\*-" ,
+this option is obsolete and poorly supported.
Among other things it should not be used for timestamps after the year 2037,
and it should not be combined with
.B "\*-b slim"
if
.IR timezone 's
transitions are at standard time or Universal Time (UT) instead of local time.
+.sp
+If
+.I timezone
+is
+.BR \*- ,
+any already-existing link is removed.
.TP
.BR "\*-r " "[\fB@\fP\fIlo\fP][\fB/@\fP\fIhi\fP]"
-Reduce the size of output files by limiting their applicability
+Limit the applicability of output files
to timestamps in the range from
.I lo
(inclusive) to
@@ -124,9 +148,12 @@ to timestamps in the range from
.I lo
and
.I hi
-are possibly-signed decimal counts of seconds since the Epoch
+are possibly signed decimal counts of seconds since the Epoch
(1970-01-01 00:00:00 UTC).
Omitted counts default to extreme values.
+The output files use UT offset 0 and abbreviation
+.q "\*-00"
+in place of the omitted timestamp data.
For example,
.q "zic \*-r @0"
omits data intended for negative timestamps (i.e., before the Epoch), and
@@ -135,12 +162,31 @@ outputs data intended only for nonnegative timestamps that fit into
31-bit signed integers.
On platforms with GNU
.BR date ,
-.q "zic \-r @$(date +%s)"
+.q "zic \*-r @$(date +%s)"
omits data intended for past timestamps.
+Although this option typically reduces the output file's size,
+the size can increase due to the need to represent the timestamp range
+boundaries, particularly if
+.I hi
+causes a TZif file to contain explicit entries for
+.RI pre- hi
+transitions rather than concisely representing them
+with an extended POSIX TZ string.
Also see the
.B "\*-b slim"
option for another way to shrink output size.
.TP
+.BI "\*-R @" hi
+Generate redundant trailing explicit transitions for timestamps
+that occur less than
+.I hi
+seconds since the Epoch, even though the transitions could be
+more concisely represented via the extended POSIX TZ string.
+This option does not affect the represented timestamps.
+Although it accommodates nonstandard TZif readers
+that ignore the extended POSIX TZ string,
+it increases the size of the altered output files.
+.TP
.BI "\*-t " file
When creating local time information, put the configuration link in
the named file rather than in the standard location.
@@ -149,7 +195,10 @@ the named file rather than in the standard location.
Be more verbose, and complain about the following situations:
.RS
.PP
-The input specifies a link to a link.
+The input specifies a link to a link,
+something not supported by some older parsers, including
+.B zic
+itself through release 2022e.
.PP
A year that appears in a data file is outside the range
of representable years.
@@ -196,10 +245,10 @@ for
.PP
The output file does not contain all the information about the
long-term future of a timezone, because the future cannot be summarized as
-an extended POSIX TZ string. For example, as of 2019 this problem
-occurs for Iran's daylight-saving rules for the predicted future, as
-these rules are based on the Iranian calendar, which cannot be
-represented.
+an extended POSIX TZ string. For example, as of 2023 this problem
+occurs for Morocco's daylight-saving rules, as these rules are based
+on predictions for when Ramadan will be observed, something that
+an extended POSIX TZ string cannot represent.
.PP
The output contains data that may not be handled properly by client
code designed for older
@@ -207,6 +256,15 @@ code designed for older
output formats. These compatibility issues affect only timestamps
before 1970 or after the start of 2038.
.PP
+The output contains a truncated leap second table,
+which can cause some older TZif readers to misbehave.
+This can occur if the
+.B "\*-L"
+option is used, and either an Expires line is present or
+the
+.B "\*-r"
+option is also used.
+.PP
The output file contains more than 1200 transitions,
which may be mishandled by some clients.
The current reference client supports at most 2000 transitions;
@@ -233,10 +291,11 @@ format.
.PP
Input files should be text files, that is, they should be a series of
zero or more lines, each ending in a newline byte and containing at
-most 511 bytes, and without any NUL bytes. The input text's encoding
+most 2048 bytes counting the newline, and without any NUL bytes.
+The input text's encoding
is typically UTF-8 or ASCII; it should have a unibyte representation
for the POSIX Portable Character Set (PPCS)
-\*<http://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
+\*<https://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
and the encoding's non-unibyte characters should consist entirely of
non-PPCS bytes. Non-PPCS characters typically occur only in comments:
although output file names and time zone abbreviations can contain
@@ -272,9 +331,9 @@ abbreviation must be unambiguous in context.
A rule line has the form
.nf
.ti +.5i
-.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
+.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
.sp
-Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
.sp
For example:
.ti +.5i
@@ -293,7 +352,9 @@ nor
.q + .
To allow for future extensions,
an unquoted name should not contain characters from the set
-.q !$%&'()*,/:;<=>?@[\e]\[ha]\`{|}\[ti] .
+.ie \n(.g .q \f(CR!$%&\(aq()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
+.el .ie t .q \f(CW!$%&'()*,/:;<=>?@[\e]^\(ga{|}~\fP .
+.el .q !$%&'()*,/:;<=>?@[\e]^`{|}~ .
.TP
.B FROM
Gives the first year in which the rule applies.
@@ -323,12 +384,17 @@ may be used to repeat the value of the
.B FROM
field.
.TP
-.B TYPE
-should be
+.B \*-
+Is a reserved field and should always contain
.q \*-
-and is present for compatibility with older versions of
-.B zic
-in which it could contain year types.
+for compatibility with older versions of
+.BR zic .
+It was previously known as the
+.B TYPE
+field, which could contain values to allow a
+separate script to further restrict in which
+.q types
+of years the rule would apply.
.TP
.B IN
Names the month in which the rule takes effect.
@@ -496,14 +562,14 @@ This field has the same format as the
.B AT
and
.B SAVE
-fields of rule lines;
+fields of rule lines, except without suffix letters;
begin the field with a minus sign if time must be subtracted from UT.
.TP
.B RULES
The name of the rules that apply in the timezone or,
alternatively, a field in the same format as a rule-line SAVE column,
-giving of the amount of time to be added to local standard time
-effect, and whether the resulting time is standard or daylight saving.
+giving the amount of time to be added to local standard time
+and whether the resulting time is standard or daylight saving.
If this field is
.B \*-
then standard time always applies.
@@ -529,7 +595,7 @@ using the shortest form that does not lose information, where
.IR mm ,
and
.I ss
-are the hours, minutes, and seconds east (+) or west (\(mi) of UT.
+are the hours, minutes, and seconds east (+) or west (\-) of UT.
Alternatively,
a slash (/)
separates standard and daylight abbreviations.
@@ -538,6 +604,9 @@ alphanumeric ASCII characters,
.q "+"
and
.q "\*-".
+By convention, the time zone abbreviation
+.q "\*-00"
+is a placeholder that means local time is unspecified.
.TP
.B UNTIL
The time at which the UT offset or the rule(s) change for a location.
@@ -579,6 +648,42 @@ first transition into standard time.
In a single zone it is an error if two rules take effect at the same
instant, or if two zone changes take effect at the same instant.
.PP
+If a continuation line subtracts
+.I N
+seconds from the UT offset after a transition that would be
+interpreted to be later if using the continuation line's UT offset and
+rules, the
+.q "until"
+time of the previous zone or continuation line is interpreted
+according to the continuation line's UT offset and rules, and any rule
+that would otherwise take effect in the next
+.I N
+seconds is instead assumed to take effect simultaneously.
+For example:
+.br
+.ne 7
+.nf
+.in +2m
+.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'2006\0\0'u +\w'\*-\0\0'u +\w'Oct\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.sp
+# Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
+Rule US 1967 2006 - Oct lastSun 2:00 0 S
+Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
+.ta \w'Zone\0\0America/Menominee\0\0'u +\w'STDOFF\0\0'u +\w'RULES\0\0'u +\w'FORMAT\0\0'u
+# Zone\0\0NAME STDOFF RULES FORMAT [UNTIL]
+Zone\0\0America/Menominee \*-5:00 \*- EST 1973 Apr 29 2:00
+ \*-6:00 US C%sT
+.sp
+.in
+.fi
+Here, an incorrect reading would be there were two clock changes on 1973-04-29,
+the first from 02:00 EST (\*-05) to 01:00 CST (\*-06),
+and the second an hour later from 02:00 CST (\*-06) to 03:00 CDT (\*-05).
+However,
+.B zic
+interprets this more sensibly as a single transition from 02:00 CST (\*-05) to
+02:00 CDT (\*-05).
+.PP
A link line has the form
.sp
.nf
@@ -596,19 +701,37 @@ The
.B TARGET
field should appear as the
.B NAME
-field in some zone line.
+field in some zone line or as the
+.B LINK-NAME
+field in some link line.
The
.B LINK-NAME
field is used as an alternative name for that zone;
it has the same syntax as a zone line's
.B NAME
field.
+Links can chain together, although the behavior is unspecified if a
+chain of one or more links does not terminate in a Zone name.
+A link line can appear before the line that defines the link target.
+For example:
+.sp
+.ne 3
+.nf
+.in +2m
+.ta \w'Zone\0\0'u +\w'Greenwich\0\0'u
+Link Greenwich G_M_T
+Link Etc/GMT Greenwich
+Zone Etc/GMT\0\00\0\0\*-\0\0GMT
+.sp
+.in
+.fi
+The two links are chained together, and G_M_T, Greenwich, and Etc/GMT
+all name the same zone.
.PP
Except for continuation lines,
lines may appear in any order in the input.
However, the behavior is unspecified if multiple zone or link lines
-define the same name, or if the source of one link line is the target
-of another.
+define the same name.
.PP
The file that describes leap seconds can have leap lines and an
expiration line.
@@ -653,6 +776,19 @@ or
if the leap second time given by the other fields should be interpreted as
local (wall clock) time.
.PP
+Rolling leap seconds were implemented back when it was not
+clear whether common practice was rolling or stationary,
+with concerns that one would see
+Times Square ball drops where there'd be a
+.q "3... 2... 1... leap... Happy New Year"
+countdown, placing the leap second at
+midnight New York time rather than midnight UTC.
+However, this countdown style does not seem to have caught on,
+which means rolling leap seconds are not used in practice;
+also, they are not supported if the
+.B \*-r
+option is used.
+.PP
The expiration line, if present, has the form:
.nf
.ti +.5i
@@ -672,36 +808,18 @@ The
.BR DAY ,
and
.B HH:MM:SS
-fields give the expiration timestamp in UTC for the leap second table;
-.B zic
-outputs this expiration timestamp by truncating the end of the output
-file to the timestamp.
-If there is no expiration line,
-.B zic
-also accepts a comment
-.q "#expires \fIE\fP ...\&"
-where
-.I E
-is the expiration timestamp as a decimal integer count of seconds
-since the Epoch, not counting leap seconds.
-However, the
-.q "#expires"
-comment is an obsolescent feature,
-and the leap second file should use an expiration line
-instead of relying on a comment.
+fields give the expiration timestamp in UTC for the leap second table.
+.br
+.ne 22
.SH "EXTENDED EXAMPLE"
Here is an extended example of
.B zic
input, intended to illustrate many of its features.
-In this example, the EU rules are for the European Union
-and for its predecessor organization, the European Communities.
-.br
-.ne 22
.nf
.in +2m
-.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
.sp
-# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+# Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S
Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*-
.sp .5
@@ -723,13 +841,13 @@ Link Europe/Zurich Europe/Vaduz
.sp
.in
.fi
-In this example, the timezone is named Europe/Zurich but it has an alias
-as Europe/Vaduz. This example says that Zurich was 34 minutes and 8
+In this example, the EU rules are for the European Union
+and for its predecessor organization, the European Communities.
+The timezone is named Europe/Zurich and it has the alias Europe/Vaduz.
+This example says that Zurich was 34 minutes and 8
seconds east of UT until 1853-07-16 at 00:00, when the legal offset
was changed to
-.ds o 7 degrees 26 minutes 22.50 seconds
-.if \n(.g .if c \(de .if c \(fm .if c \(sd .ds o 7\(de\|26\(fm\|22.50\(sd
-\*o,
+7\*d\*_26\*m\*_22.50\*s,
which works out to 0:29:45.50;
.B zic
treats this by rounding it to 0:29:46.
@@ -783,5 +901,3 @@ specifying transition instants using universal time.
.SH SEE ALSO
.BR tzfile (5),
.BR zdump (8)
-.\" This file is in the public domain, so clarified as of
-.\" 2009-05-17 by Arthur David Olson.