usr/src/boot: add .PARALLEL to makefiles
[unleashed.git] / contrib / tzcode / zdump.8
blobef611db7cf9e112f18e07d0ef256f67f3bfdaed9
1 .TH ZDUMP 8
2 .SH NAME
3 zdump \- time zone dumper
4 .SH SYNOPSIS
5 .B zdump
7 .I option
8 \&... ] [
9 .I zonename
10 \&... ]
11 .SH DESCRIPTION
12 .ie '\(lq'' .ds lq \&"\"
13 .el .ds lq \(lq\"
14 .ie '\(rq'' .ds rq \&"\"
15 .el .ds rq \(rq\"
16 .de q
17 \\$3\*(lq\\$1\*(rq\\$2
19 .ie \n(.g .ds - \f(CW-\fP
20 .el ds - \-
21 .I Zdump
22 prints the current time in each
23 .I zonename
24 named on the command line.
25 .PP
26 These options are available:
27 .TP
28 .BI "\*-\*-version"
29 Output version information and exit.
30 .TP
31 .B \*-i
32 .I "(This option is experimental: its behavior may change in future versions.)"
33 Output a description of time intervals.  For each
34 .I zonename
35 on the command line, output an interval-format description of the
36 zone.  See
37 .q "INTERVAL FORMAT"
38 below.
39 .TP
40 .B \*-v
41 Output a verbose description of time intervals.
42 For each
43 .I zonename
44 on the command line,
45 print the time at the lowest possible time value,
46 the time one day after the lowest possible time value,
47 the times both one second before and exactly at
48 each detected time discontinuity,
49 the time at one day less than the highest possible time value,
50 and the time at the highest possible time value.
51 Each line is followed by
52 .BI isdst= D
53 where
54 .I D
55 is positive, zero, or negative depending on whether
56 the given time is daylight saving time, standard time,
57 or an unknown time type, respectively.
58 Each line is also followed by
59 .BI gmtoff= N
60 if the given local time is known to be
61 .I N
62 seconds east of Greenwich.
63 .TP
64 .B \*-V
65 Like
66 .BR \*-v ,
67 except omit the times relative to the extreme time values.
68 This generates output that is easier to compare to that of
69 implementations with different time representations.
70 .TP
71 .BI "\*-c " [loyear,]hiyear
72 Cut off interval output at the given year(s).
73 Cutoff times are computed using the proleptic Gregorian calendar with year 0
74 and with Universal Time (UT) ignoring leap seconds.
75 The lower bound is exclusive and the upper is inclusive; for example, a
76 .I loyear
77 of 1970 excludes a transition occurring at 1970-01-01 00:00:00 UTC but a
78 .I hiyear
79 of 1970 includes the transition.
80 The default cutoff is
81 .BR \*-500,2500 .
82 .TP
83 .BI "\*-t " [lotime,]hitime
84 Cut off interval output at the given time(s),
85 given in decimal seconds since 1970-01-01 00:00:00
86 Coordinated Universal Time (UTC).
87 The
88 .I zonename
89 determines whether the count includes leap seconds.
90 As with
91 .BR \*-c ,
92 the cutoff's lower bound is exclusive and its upper bound is inclusive.
93 .SH "INTERVAL FORMAT"
94 .I "This format is experimental: it may change in future versions."
95 .PP
96 The interval format is a compact text representation that is intended
97 to be both human- and machine-readable.  It consists of an empty line,
98 then a line
99 .q "TZ=\fIstring\fP"
100 where
101 .I string
102 is a double-quoted string giving the zone name, a second line
103 .q "\*- \*- \fIinterval\fP"
104 describing the time interval before the first transition if any, and
105 zero or more following lines
106 .q "\fIdate time interval\fP",
107 one line for each transition time and following interval.  Fields are
108 separated by single tabs.
110 Dates are in
111 .IR yyyy - mm - dd
112 format and times are in 24-hour
113 .IR hh : mm : ss
114 format where
115 .IR hh <24.
116 Times are in local time immediately after the transition.  A
117 time interval description consists of a UT offset in signed
118 .RI \(+- hhmmss
119 format, a time zone abbreviation, and an isdst flag.  An abbreviation
120 that equals the UT offset is omitted; other abbreviations are
121 double-quoted strings unless they consist of one or more alphabetic
122 characters.  An isdst flag is omitted for standard time, and otherwise
123 is a decimal integer that is unsigned and positive (typically 1) for
124 daylight saving time and negative for unknown.
126 In times and in UT offsets with absolute value less than 100 hours,
127 the seconds are omitted if they are zero, and
128 the minutes are also omitted if they are also zero.  Positive UT
129 offsets are east of Greenwich.  The UT offset \*-00 denotes a UT
130 placeholder in areas where the actual offset is unspecified; by
131 convention, this occurs when the UT offset is zero and the time zone
132 abbreviation begins with
133 .q "\*-"
134 or is
135 .q "zzz".
137 In double-quoted strings, escape sequences represent unusual
138 characters.  The escape sequences are \es for space, and \e", \e\e,
139 \ef, \en, \er, \et, and \ev with their usual meaning in the C
140 programming language.  E.g., the double-quoted string
141 \*(lq"CET\es\e"\e\e"\*(rq represents the character sequence \*(lqCET
142 "\e\*(rq.\""
144 .ne 9
145 Here is an example of the output, with the leading empty line omitted.
146 (This example is shown with tab stops set far enough apart so that the
147 tabbed columns line up.)
150 .if \n(.g .ft CW
151 .if t .in +.5i
152 .if n .in +2
153 .nr w \w'1896-01-13 'u
154 .ta \nwu +\nwu +\nwu +\nwu
155 TZ="Pacific/Honolulu"
156 -       -       -10:31:26       LMT
157 1896-01-13      12:01:26        -10:30  HST
158 1933-04-30      03      -09:30  HDT     1
159 1933-05-21      11      -10:30  HST
160 1942-02-09      03      -09:30  HDT     1
161 1945-09-30      01      -10:30  HST
162 1947-06-08      02:30   -10     HST
164 .if \n(.g .ft
167 Here, local time begins 10 hours, 31 minutes and 26 seconds west of
168 UT, and is a standard time abbreviated LMT.  Immediately after the
169 first transition, the date is 1896-01-13 and the time is 12:01:26, and
170 the following time interval is 10.5 hours west of UT, a standard time
171 abbreviated HST.  Immediately after the second transition, the date is
172 1933-04-30 and the time is 03:00:00 and the following time interval is
173 9.5 hours west of UT, is abbreviated HDT, and is daylight saving time.
174 Immediately after the last transition the date is 1947-06-08 and the
175 time is 02:30:00, and the following time interval is 10 hours west of
176 UT, a standard time abbreviated HST.
178 .ne 10
179 Here are excerpts from another example:
182 .if \n(.g .ft CW
183 .if t .in +.5i
184 .if n .in +2
185 TZ="Europe/Astrakhan"
186 -       -       +03:12:12       LMT
187 1924-04-30      23:47:48        +03
188 1930-06-21      01      +04
189 1981-04-01      01      +05             1
190 1981-09-30      23      +04
191 \&...
192 2014-10-26      01      +03
193 2016-03-27      03      +04
195 .if \n(.g .ft
198 This time zone is east of UT, so its UT offsets are positive.  Also,
199 many of its time zone abbreviations are omitted since they duplicate
200 the text of the UT offset.
201 .SH LIMITATIONS
202 Time discontinuities are found by sampling the results returned by localtime
203 at twelve-hour intervals.
204 This works in all real-world cases;
205 one can construct artificial time zones for which this fails.
207 In the
208 .B \*-v
210 .B \*-V
211 output,
212 .q "UT"
213 denotes the value returned by
214 .IR gmtime (3),
215 which uses UTC for modern time stamps and some other UT flavor for
216 time stamps that predate the introduction of UTC.
217 No attempt is currently made to have the output use
218 .q "UTC"
219 for newer and
220 .q "UT"
221 for older time stamps, partly because the exact date of the
222 introduction of UTC is problematic.
223 .SH "SEE ALSO"
224 newctime(3), tzfile(5), zic(8)
225 .\" This file is in the public domain, so clarified as of
226 .\" 2009-05-17 by Arthur David Olson.