]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man8/zdump.8
share/mk/: build-html: Don't build mbind.2 and set_mempolicy.2
[thirdparty/man-pages.git] / man8 / zdump.8
CommitLineData
1349d7ca
AC
1.\" This file is in the public domain, so clarified as of
2.\" 2009-05-17 by Arthur David Olson.
3.TH zdump 8 "" "Time Zone Database"
fea681da 4.SH NAME
5b0dc1ba 5zdump \- timezone dumper
fea681da 6.SH SYNOPSIS
09c05a89
PE
7.B zdump
8[
9.I option
10\&... ] [
11.I timezone
12\&... ]
fea681da 13.SH DESCRIPTION
1349d7ca
AC
14.ie '\(lq'' .ds lq \&"\"
15.el .ds lq \(lq\"
16.ie '\(rq'' .ds rq \&"\"
17.el .ds rq \(rq\"
09c05a89
PE
18.de q
19\\$3\*(lq\\$1\*(rq\\$2
20..
1349d7ca
AC
21.ie \n(.g .ds - \f(CR-\fP
22.el .ds - \-
7d92574b
MK
23The
24.B zdump
25program prints the current time in each
09c05a89 26.I timezone
fea681da 27named on the command line.
725399bb 28.SH OPTIONS
fea681da 29.TP
09c05a89 30.B \*-\*-version
d0853a63
MK
31Output version information and exit.
32.TP
09c05a89 33.B \*-\*-help
c28ca2ba 34Output short usage message and exit.
d0853a63 35.TP
09c05a89
PE
36.B \*-i
37Output a description of time intervals. For each
38.I timezone
39on the command line, output an interval-format description of the
40timezone. See
41.q "INTERVAL FORMAT"
42below.
43.TP
44.B \*-v
45Output a verbose description of time intervals.
fea681da 46For each
09c05a89 47.I timezone
fea681da 48on the command line,
1349d7ca
AC
49print the times at the two extreme time values,
50the times (if present) at and just beyond the boundaries of years that
51.BR localtime (3)
52and
53.BR gmtime (3)
54can represent, and
fea681da 55the times both one second before and exactly at
1349d7ca 56each detected time discontinuity.
09c05a89
PE
57Each line is followed by
58.BI isdst= D
59where
60.I D
61is positive, zero, or negative depending on whether
62the given time is daylight saving time, standard time,
63or an unknown time type, respectively.
64Each line is also followed by
65.BI gmtoff= N
66if the given local time is known to be
67.I N
68seconds east of Greenwich.
fea681da 69.TP
09c05a89
PE
70.B \*-V
71Like
72.BR \*-v ,
1349d7ca 73except omit output concerning extreme time and year values.
09c05a89
PE
74This generates output that is easier to compare to that of
75implementations with different time representations.
76.TP
77.BI "\*-c " \fR[\fIloyear , \fR]\fIhiyear
78Cut off interval output at the given year(s).
79Cutoff times are computed using the proleptic Gregorian calendar with year 0
80and with Universal Time (UT) ignoring leap seconds.
0a9e18a4 81Cutoffs are at the start of each year, where the lower-bound
1349d7ca 82timestamp is inclusive and the upper is exclusive; for example,
0a9e18a4 83.B "\*-c 1970,2070"
1349d7ca
AC
84selects transitions on or after 1970-01-01 00:00:00 UTC
85and before 2070-01-01 00:00:00 UTC.
09c05a89
PE
86The default cutoff is
87.BR \*-500,2500 .
88.TP
89.BI "\*-t " \fR[\fIlotime , \fR]\fIhitime
90Cut off interval output at the given time(s),
91given in decimal seconds since 1970-01-01 00:00:00
92Coordinated Universal Time (UTC).
93The
94.I timezone
95determines whether the count includes leap seconds.
96As with
97.BR \*-c ,
1349d7ca 98the cutoff's lower bound is inclusive and its upper bound is exclusive.
09c05a89
PE
99.SH "INTERVAL FORMAT"
100The interval format is a compact text representation that is intended
101to be both human- and machine-readable. It consists of an empty line,
102then a line
103.q "TZ=\fIstring\fP"
104where
105.I string
106is a double-quoted string giving the timezone, a second line
107.q "\*- \*- \fIinterval\fP"
108describing the time interval before the first transition if any, and
109zero or more following lines
110.q "\fIdate time interval\fP",
111one line for each transition time and following interval. Fields are
112separated by single tabs.
79bd8a7a 113.PP
09c05a89
PE
114Dates are in
115.IR yyyy - mm - dd
116format and times are in 24-hour
117.IR hh : mm : ss
118format where
119.IR hh <24.
120Times are in local time immediately after the transition. A
121time interval description consists of a UT offset in signed
122.RI \(+- hhmmss
123format, a time zone abbreviation, and an isdst flag. An abbreviation
124that equals the UT offset is omitted; other abbreviations are
125double-quoted strings unless they consist of one or more alphabetic
126characters. An isdst flag is omitted for standard time, and otherwise
127is a decimal integer that is unsigned and positive (typically 1) for
128daylight saving time and negative for unknown.
79bd8a7a 129.PP
09c05a89
PE
130In times and in UT offsets with absolute value less than 100 hours,
131the seconds are omitted if they are zero, and
132the minutes are also omitted if they are also zero. Positive UT
133offsets are east of Greenwich. The UT offset \*-00 denotes a UT
134placeholder in areas where the actual offset is unspecified; by
135convention, this occurs when the UT offset is zero and the time zone
136abbreviation begins with
137.q "\*-"
138or is
139.q "zzz".
79bd8a7a 140.PP
09c05a89
PE
141In double-quoted strings, escape sequences represent unusual
142characters. The escape sequences are \es for space, and \e", \e\e,
143\ef, \en, \er, \et, and \ev with their usual meaning in the C
144programming language. E.g., the double-quoted string
145\*(lq"CET\es\e"\e\e"\*(rq represents the character sequence \*(lqCET
146"\e\*(rq.\""
79bd8a7a 147.PP
09c05a89
PE
148.ne 9
149Here is an example of the output, with the leading empty line omitted.
150(This example is shown with tab stops set far enough apart so that the
151tabbed columns line up.)
152.nf
153.sp
1349d7ca 154.if \n(.g .ft CR
79bd8a7a 155.in +2
0a9e18a4 156.nr w \w'1896-01-13 'u+\n(.i
79bd8a7a 157.ta \w'1896-01-13\0\0'u +\w'12:01:26\0\0'u +\w'-103126\0\0'u +\w'HWT\0\0'u
09c05a89 158TZ="Pacific/Honolulu"
0a9e18a4
MK
159- - -103126 LMT
1601896-01-13 12:01:26 -1030 HST
1611933-04-30 03 -0930 HDT 1
1621933-05-21 11 -1030 HST
1631942-02-09 03 -0930 HWT 1
1641945-08-14 13:30 -0930 HPT 1
1651945-09-30 01 -1030 HST
09c05a89
PE
1661947-06-08 02:30 -10 HST
167.in
168.if \n(.g .ft
169.sp
170.fi
171Here, local time begins 10 hours, 31 minutes and 26 seconds west of
172UT, and is a standard time abbreviated LMT. Immediately after the
173first transition, the date is 1896-01-13 and the time is 12:01:26, and
174the following time interval is 10.5 hours west of UT, a standard time
175abbreviated HST. Immediately after the second transition, the date is
1761933-04-30 and the time is 03:00:00 and the following time interval is
1779.5 hours west of UT, is abbreviated HDT, and is daylight saving time.
178Immediately after the last transition the date is 1947-06-08 and the
179time is 02:30:00, and the following time interval is 10 hours west of
180UT, a standard time abbreviated HST.
79bd8a7a 181.PP
09c05a89
PE
182.ne 10
183Here are excerpts from another example:
184.nf
185.sp
1349d7ca 186.if \n(.g .ft CR
09c05a89
PE
187.if t .in +.5i
188.if n .in +2
189TZ="Europe/Astrakhan"
0a9e18a4 190- - +031212 LMT
09c05a89
PE
1911924-04-30 23:47:48 +03
1921930-06-21 01 +04
1931981-04-01 01 +05 1
1941981-09-30 23 +04
195\&...
1962014-10-26 01 +03
1972016-03-27 03 +04
198.in
199.if \n(.g .ft
200.sp
201.fi
202This time zone is east of UT, so its UT offsets are positive. Also,
203many of its time zone abbreviations are omitted since they duplicate
204the text of the UT offset.
205.SH LIMITATIONS
1349d7ca
AC
206Time discontinuities are found by sampling the results returned by
207.BR localtime (3)
09c05a89
PE
208at twelve-hour intervals.
209This works in all real-world cases;
210one can construct artificial time zones for which this fails.
79bd8a7a 211.PP
09c05a89
PE
212In the
213.B \*-v
214and
215.B \*-V
216output,
217.q "UT"
218denotes the value returned by
7ab4eb9a 219.BR gmtime (3),
09c05a89
PE
220which uses UTC for modern timestamps and some other UT flavor for
221timestamps that predate the introduction of UTC.
222No attempt is currently made to have the output use
223.q "UTC"
224for newer and
225.q "UT"
226for older timestamps, partly because the exact date of the
227introduction of UTC is problematic.
47297adb 228.SH SEE ALSO
46f5295b
MK
229.BR tzfile (5),
230.BR zic (8)