xref: /freebsd/contrib/tzcode/zic.8 (revision bc42155199b5b0b479311e05b07aee7f6f9c5172)
1*bc421551SDag-Erling Smørgrav.\" This file is in the public domain, so clarified as of
2*bc421551SDag-Erling Smørgrav.\" 2009-05-17 by Arthur David Olson.
3*bc421551SDag-Erling Smørgrav.\"
4*bc421551SDag-Erling Smørgrav.\" $FreeBSD$
5*bc421551SDag-Erling Smørgrav.\"
6*bc421551SDag-Erling Smørgrav.Dd December 15, 2022
7*bc421551SDag-Erling Smørgrav.Dt ZIC 8
8*bc421551SDag-Erling Smørgrav.Os
9*bc421551SDag-Erling Smørgrav.Sh NAME
10*bc421551SDag-Erling Smørgrav.Nm zic
11*bc421551SDag-Erling Smørgrav.Nd timezone compiler
12*bc421551SDag-Erling Smørgrav.Sh SYNOPSIS
13*bc421551SDag-Erling Smørgrav.Nm
14*bc421551SDag-Erling Smørgrav.Op Fl -help
15*bc421551SDag-Erling Smørgrav.Op Fl -version
16*bc421551SDag-Erling Smørgrav.Op Fl Dsv
17*bc421551SDag-Erling Smørgrav.Op Fl b Ar slim | fat
18*bc421551SDag-Erling Smørgrav.Op Fl d Ar directory
19*bc421551SDag-Erling Smørgrav.Op Fl g Ar gid
20*bc421551SDag-Erling Smørgrav.Op Fl l Ar localtime
21*bc421551SDag-Erling Smørgrav.Op Fl L Ar leapseconds
22*bc421551SDag-Erling Smørgrav.Op Fl m Ar mode
23*bc421551SDag-Erling Smørgrav.Op Fl p Ar posixrules
24*bc421551SDag-Erling Smørgrav.Oo
25*bc421551SDag-Erling Smørgrav.Fl r
26*bc421551SDag-Erling Smørgrav.Op @ Ns Ar lo Ns
27*bc421551SDag-Erling Smørgrav.Op /@ Ns Ar hi
28*bc421551SDag-Erling Smørgrav.Oc
29*bc421551SDag-Erling Smørgrav.Op Fl R @ Ns Ar hi
30*bc421551SDag-Erling Smørgrav.Op Fl t Ar localtime-link
31*bc421551SDag-Erling Smørgrav.Op Fl u Ar uid
32*bc421551SDag-Erling Smørgrav.Op Ar filename ...
33*bc421551SDag-Erling Smørgrav.Sh DESCRIPTION
34*bc421551SDag-Erling SmørgravThe
35*bc421551SDag-Erling Smørgrav.Nm
36*bc421551SDag-Erling Smørgravprogram reads text from the file(s) named on the command line
37*bc421551SDag-Erling Smørgravand creates the timezone information format (TZif) files
38*bc421551SDag-Erling Smørgravspecified in this input.
39*bc421551SDag-Erling SmørgravIf a
40*bc421551SDag-Erling Smørgrav.Ar filename
41*bc421551SDag-Erling Smørgravis
42*bc421551SDag-Erling Smørgrav.Dq "-" ,
43*bc421551SDag-Erling Smørgravstandard input is read.
44*bc421551SDag-Erling Smørgrav.Pp
45*bc421551SDag-Erling SmørgravThe following options are available:
46*bc421551SDag-Erling Smørgrav.Bl -tag -width indent
47*bc421551SDag-Erling Smørgrav.It Fl -version
48*bc421551SDag-Erling SmørgravOutput version information and exit.
49*bc421551SDag-Erling Smørgrav.It Fl -help
50*bc421551SDag-Erling SmørgravOutput short usage message and exit.
51*bc421551SDag-Erling Smørgrav.It Fl b Ar bloat
52*bc421551SDag-Erling SmørgravOutput backward-compatibility data as specified by
53*bc421551SDag-Erling Smørgrav.Ar bloat .
54*bc421551SDag-Erling SmørgravIf
55*bc421551SDag-Erling Smørgrav.Ar bloat
56*bc421551SDag-Erling Smørgravis
57*bc421551SDag-Erling Smørgrav.Cm fat ,
58*bc421551SDag-Erling Smørgravgenerate additional data entries that work around potential bugs or
59*bc421551SDag-Erling Smørgravincompatibilities in older software, such as software that mishandles
60*bc421551SDag-Erling Smørgravthe 64-bit generated data.
61*bc421551SDag-Erling SmørgravIf
62*bc421551SDag-Erling Smørgrav.Ar bloat
63*bc421551SDag-Erling Smørgravis
64*bc421551SDag-Erling Smørgrav.Cm slim ,
65*bc421551SDag-Erling Smørgravkeep the output files small; this can help check for the bugs
66*bc421551SDag-Erling Smørgravand incompatibilities.
67*bc421551SDag-Erling SmørgravThe default is
68*bc421551SDag-Erling Smørgrav.Cm slim ,
69*bc421551SDag-Erling Smørgravas software that mishandles 64-bit data typically
70*bc421551SDag-Erling Smørgravmishandles timestamps after the year 2038 anyway.
71*bc421551SDag-Erling SmørgravAlso see the
72*bc421551SDag-Erling Smørgrav.Fl r
73*bc421551SDag-Erling Smørgravoption for another way to alter output size.
74*bc421551SDag-Erling Smørgrav.It Fl d Ar directory
75*bc421551SDag-Erling SmørgravCreate time conversion information files in the named directory rather than
76*bc421551SDag-Erling Smørgravin the standard directory named below.
77*bc421551SDag-Erling Smørgrav.It Fl l Ar timezone
78*bc421551SDag-Erling SmørgravUse
79*bc421551SDag-Erling Smørgrav.Ar timezone
80*bc421551SDag-Erling Smørgravas local time.
81*bc421551SDag-Erling SmørgravThe
82*bc421551SDag-Erling Smørgrav.Nm
83*bc421551SDag-Erling Smørgravutility
84*bc421551SDag-Erling Smørgravwill act as if the input contained a link line of the form
85*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
86*bc421551SDag-Erling SmørgravLink	timezone		localtime
87*bc421551SDag-Erling Smørgrav.Ed
88*bc421551SDag-Erling Smørgrav.Pp
89*bc421551SDag-Erling SmørgravIf
90*bc421551SDag-Erling Smørgrav.Ar timezone
91*bc421551SDag-Erling Smørgravis
92*bc421551SDag-Erling Smørgrav.Ql - ,
93*bc421551SDag-Erling Smørgravany already-existing link is removed.
94*bc421551SDag-Erling Smørgrav.It Fl L Ar filename
95*bc421551SDag-Erling SmørgravRead leap second information from the file with the given name.
96*bc421551SDag-Erling SmørgravIf this option is not used,
97*bc421551SDag-Erling Smørgravno leap second information appears in output files.
98*bc421551SDag-Erling Smørgrav.It Fl p Ar timezone
99*bc421551SDag-Erling SmørgravUse
100*bc421551SDag-Erling Smørgrav.Ar timezone 's
101*bc421551SDag-Erling Smørgravrules when handling nonstandard
102*bc421551SDag-Erling SmørgravTZ strings like
103*bc421551SDag-Erling Smørgrav.Dq "EET\-2EEST"
104*bc421551SDag-Erling Smørgravthat lack transition rules.
105*bc421551SDag-Erling SmørgravThe
106*bc421551SDag-Erling Smørgrav.Nm
107*bc421551SDag-Erling Smørgravutility
108*bc421551SDag-Erling Smørgravwill act as if the input contained a link line of the form
109*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
110*bc421551SDag-Erling SmørgravLink	\fItimezone\fP		posixrules
111*bc421551SDag-Erling Smørgrav.Ed
112*bc421551SDag-Erling Smørgrav.Pp
113*bc421551SDag-Erling SmørgravThis feature is obsolete and poorly supported.
114*bc421551SDag-Erling SmørgravAmong other things it should not be used for timestamps after the year 2037,
115*bc421551SDag-Erling Smørgravand it should not be combined with
116*bc421551SDag-Erling Smørgrav.Fl b Cm slim
117*bc421551SDag-Erling Smørgravif
118*bc421551SDag-Erling Smørgrav.Ar timezone 's
119*bc421551SDag-Erling Smørgravtransitions are at standard time or Universal Time (UT) instead of local time.
120*bc421551SDag-Erling Smørgrav.Pp
121*bc421551SDag-Erling SmørgravIf
122*bc421551SDag-Erling Smørgrav.Ar timezone
123*bc421551SDag-Erling Smørgravis
124*bc421551SDag-Erling Smørgrav.Ql - ,
125*bc421551SDag-Erling Smørgravany already-existing link is removed.
126*bc421551SDag-Erling Smørgrav.It Fl r Oo @ Ns Ar lo Oc Ns Oo /@ Ns Ar hi Oc
127*bc421551SDag-Erling SmørgravLimit the applicability of output files
128*bc421551SDag-Erling Smørgravto timestamps in the range from
129*bc421551SDag-Erling Smørgrav.Ar lo
130*bc421551SDag-Erling Smørgrav(inclusive) to
131*bc421551SDag-Erling Smørgrav.Ar hi
132*bc421551SDag-Erling Smørgrav(exclusive), where
133*bc421551SDag-Erling Smørgrav.Ar lo
134*bc421551SDag-Erling Smørgravand
135*bc421551SDag-Erling Smørgrav.Ar hi
136*bc421551SDag-Erling Smørgravare possibly-signed decimal counts of seconds since the Epoch
137*bc421551SDag-Erling Smørgrav(1970-01-01 00:00:00 UTC).
138*bc421551SDag-Erling SmørgravOmitted counts default to extreme values.
139*bc421551SDag-Erling SmørgravThe output files use UT offset 0 and abbreviation
140*bc421551SDag-Erling Smørgrav.Dq "\-00"
141*bc421551SDag-Erling Smørgravin place of the omitted timestamp data.
142*bc421551SDag-Erling SmørgravFor example,
143*bc421551SDag-Erling Smørgrav.Fl r @0
144*bc421551SDag-Erling Smørgravomits data intended for negative timestamps (i.e., before the Epoch), and
145*bc421551SDag-Erling Smørgrav.Fl r @0/@2147483648
146*bc421551SDag-Erling Smørgravoutputs data intended only for nonnegative timestamps that fit into
147*bc421551SDag-Erling Smørgrav31-bit signed integers.
148*bc421551SDag-Erling SmørgravAlthough this option typically reduces the output file's size,
149*bc421551SDag-Erling Smørgravthe size can increase due to the need to represent the timestamp range
150*bc421551SDag-Erling Smørgravboundaries, particularly if
151*bc421551SDag-Erling Smørgrav.Ar hi
152*bc421551SDag-Erling Smørgravcauses a TZif file to contain explicit entries for
153*bc421551SDag-Erling Smørgrav.Em pre-
154*bc421551SDag-Erling Smørgrav.Ar hi
155*bc421551SDag-Erling Smørgravtransitions rather than concisely representing them
156*bc421551SDag-Erling Smørgravwith an extended POSIX TZ string.
157*bc421551SDag-Erling SmørgravAlso see the
158*bc421551SDag-Erling Smørgrav.Fl b Cm slim
159*bc421551SDag-Erling Smørgravoption for another way to shrink output size.
160*bc421551SDag-Erling Smørgrav.It Fl R @ Ns Ar hi
161*bc421551SDag-Erling SmørgravGenerate redundant trailing explicit transitions for timestamps
162*bc421551SDag-Erling Smørgravthat occur less than
163*bc421551SDag-Erling Smørgrav.Ar hi
164*bc421551SDag-Erling Smørgravseconds since the Epoch, even though the transitions could be
165*bc421551SDag-Erling Smørgravmore concisely represented via the extended POSIX TZ string.
166*bc421551SDag-Erling SmørgravThis option does not affect the represented timestamps.
167*bc421551SDag-Erling SmørgravAlthough it accommodates nonstandard TZif readers
168*bc421551SDag-Erling Smørgravthat ignore the extended POSIX TZ string,
169*bc421551SDag-Erling Smørgravit increases the size of the altered output files.
170*bc421551SDag-Erling Smørgrav.It Fl t Ar file
171*bc421551SDag-Erling SmørgravWhen creating local time information, put the configuration link in
172*bc421551SDag-Erling Smørgravthe named file rather than in the standard location.
173*bc421551SDag-Erling Smørgrav.It Fl v
174*bc421551SDag-Erling SmørgravBe more verbose, and complain about the following situations:
175*bc421551SDag-Erling Smørgrav.Bl -bullet
176*bc421551SDag-Erling Smørgrav.It
177*bc421551SDag-Erling SmørgravThe input specifies a link to a link,
178*bc421551SDag-Erling Smørgravsomething not supported by some older parsers, including
179*bc421551SDag-Erling Smørgrav.Nm
180*bc421551SDag-Erling Smørgravitself through release 2022e.
181*bc421551SDag-Erling Smørgrav.It
182*bc421551SDag-Erling SmørgravA year that appears in a data file is outside the range
183*bc421551SDag-Erling Smørgravof representable years.
184*bc421551SDag-Erling Smørgrav.It
185*bc421551SDag-Erling SmørgravA time of 24:00 or more appears in the input.
186*bc421551SDag-Erling SmørgravPre-1998 versions of
187*bc421551SDag-Erling Smørgrav.Nm
188*bc421551SDag-Erling Smørgravprohibit 24:00, and pre-2007 versions prohibit times greater than 24:00.
189*bc421551SDag-Erling Smørgrav.It
190*bc421551SDag-Erling SmørgravA rule goes past the start or end of the month.
191*bc421551SDag-Erling SmørgravPre-2004 versions of
192*bc421551SDag-Erling Smørgrav.Nm
193*bc421551SDag-Erling Smørgravprohibit this.
194*bc421551SDag-Erling Smørgrav.It
195*bc421551SDag-Erling SmørgravA time zone abbreviation uses a
196*bc421551SDag-Erling Smørgrav.Ql %z
197*bc421551SDag-Erling Smørgravformat.
198*bc421551SDag-Erling SmørgravPre-2015 versions of
199*bc421551SDag-Erling Smørgrav.Nm
200*bc421551SDag-Erling Smørgravdo not support this.
201*bc421551SDag-Erling Smørgrav.It
202*bc421551SDag-Erling SmørgravA timestamp contains fractional seconds.
203*bc421551SDag-Erling SmørgravPre-2018 versions of
204*bc421551SDag-Erling Smørgrav.Nm
205*bc421551SDag-Erling Smørgravdo not support this.
206*bc421551SDag-Erling Smørgrav.It
207*bc421551SDag-Erling SmørgravThe input contains abbreviations that are mishandled by pre-2018 versions of
208*bc421551SDag-Erling Smørgrav.Nm
209*bc421551SDag-Erling Smørgravdue to a longstanding coding bug.
210*bc421551SDag-Erling SmørgravThese abbreviations include
211*bc421551SDag-Erling Smørgrav.Dq L
212*bc421551SDag-Erling Smørgravfor
213*bc421551SDag-Erling Smørgrav.Dq Link ,
214*bc421551SDag-Erling Smørgrav.Dq mi
215*bc421551SDag-Erling Smørgravfor
216*bc421551SDag-Erling Smørgrav.Dq min ,
217*bc421551SDag-Erling Smørgrav.Dq Sa
218*bc421551SDag-Erling Smørgravfor
219*bc421551SDag-Erling Smørgrav.Dq Sat ,
220*bc421551SDag-Erling Smørgravand
221*bc421551SDag-Erling Smørgrav.Dq Su
222*bc421551SDag-Erling Smørgravfor
223*bc421551SDag-Erling Smørgrav.Dq Sun .
224*bc421551SDag-Erling Smørgrav.It
225*bc421551SDag-Erling SmørgravThe output file does not contain all the information about the
226*bc421551SDag-Erling Smørgravlong-term future of a timezone, because the future cannot be summarized as
227*bc421551SDag-Erling Smørgravan extended POSIX TZ string.
228*bc421551SDag-Erling SmørgravFor example, as of 2019 this problem
229*bc421551SDag-Erling Smørgravoccurs for Iran's daylight-saving rules for the predicted future, as
230*bc421551SDag-Erling Smørgravthese rules are based on the Iranian calendar, which cannot be
231*bc421551SDag-Erling Smørgravrepresented.
232*bc421551SDag-Erling Smørgrav.It
233*bc421551SDag-Erling SmørgravThe output contains data that may not be handled properly by client
234*bc421551SDag-Erling Smørgravcode designed for older
235*bc421551SDag-Erling Smørgrav.Nm
236*bc421551SDag-Erling Smørgravoutput formats.
237*bc421551SDag-Erling SmørgravThese compatibility issues affect only timestamps
238*bc421551SDag-Erling Smørgravbefore 1970 or after the start of 2038.
239*bc421551SDag-Erling Smørgrav.It
240*bc421551SDag-Erling SmørgravThe output contains a truncated leap second table,
241*bc421551SDag-Erling Smørgravwhich can cause some older TZif readers to misbehave.
242*bc421551SDag-Erling SmørgravThis can occur if the
243*bc421551SDag-Erling Smørgrav.Fl L
244*bc421551SDag-Erling Smørgravoption is used, and either an Expires line is present or
245*bc421551SDag-Erling Smørgravthe
246*bc421551SDag-Erling Smørgrav.Fl r
247*bc421551SDag-Erling Smørgravoption is also used.
248*bc421551SDag-Erling Smørgrav.It
249*bc421551SDag-Erling SmørgravThe output file contains more than 1200 transitions,
250*bc421551SDag-Erling Smørgravwhich may be mishandled by some clients.
251*bc421551SDag-Erling SmørgravThe current reference client supports at most 2000 transitions;
252*bc421551SDag-Erling Smørgravpre-2014 versions of the reference client support at most 1200
253*bc421551SDag-Erling Smørgravtransitions.
254*bc421551SDag-Erling Smørgrav.It
255*bc421551SDag-Erling SmørgravA time zone abbreviation has fewer than 3 or more than 6 characters.
256*bc421551SDag-Erling SmørgravPOSIX requires at least 3, and requires implementations to support
257*bc421551SDag-Erling Smørgravat least 6.
258*bc421551SDag-Erling Smørgrav.It
259*bc421551SDag-Erling SmørgravAn output file name contains a byte that is not an ASCII letter,
260*bc421551SDag-Erling Smørgrav.Dq "\-" ,
261*bc421551SDag-Erling Smørgrav.Dq "/" ,
262*bc421551SDag-Erling Smørgravor
263*bc421551SDag-Erling Smørgrav.Dq "_" ;
264*bc421551SDag-Erling Smørgravor it contains a file name component that contains more than 14 bytes
265*bc421551SDag-Erling Smørgravor that starts with
266*bc421551SDag-Erling Smørgrav.Dq "\-" .
267*bc421551SDag-Erling Smørgrav.El
268*bc421551SDag-Erling Smørgrav.El
269*bc421551SDag-Erling Smørgrav.RE
270*bc421551SDag-Erling Smørgrav.Sh FILES
271*bc421551SDag-Erling SmørgravInput files use the format described in this section; output files use
272*bc421551SDag-Erling Smørgrav.Xr tzfile 5
273*bc421551SDag-Erling Smørgravformat.
274*bc421551SDag-Erling Smørgrav.Pp
275*bc421551SDag-Erling SmørgravInput files should be text files, that is, they should be a series of
276*bc421551SDag-Erling Smørgravzero or more lines, each ending in a newline byte and containing at
277*bc421551SDag-Erling Smørgravmost 2048 bytes counting the newline, and without any NUL bytes.
278*bc421551SDag-Erling SmørgravThe input text's encoding
279*bc421551SDag-Erling Smørgravis typically UTF-8 or ASCII; it should have a unibyte representation
280*bc421551SDag-Erling Smørgravfor the POSIX Portable Character Set (PPCS)
281*bc421551SDag-Erling Smørgrav\*<https://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
282*bc421551SDag-Erling Smørgravand the encoding's non-unibyte characters should consist entirely of
283*bc421551SDag-Erling Smørgravnon-PPCS bytes.
284*bc421551SDag-Erling SmørgravNon-PPCS characters typically occur only in comments:
285*bc421551SDag-Erling Smørgravalthough output file names and time zone abbreviations can contain
286*bc421551SDag-Erling Smørgravnearly any character, other software will work better if these are
287*bc421551SDag-Erling Smørgravlimited to the restricted syntax described under the
288*bc421551SDag-Erling Smørgrav.Fl v
289*bc421551SDag-Erling Smørgravoption.
290*bc421551SDag-Erling Smørgrav.Pp
291*bc421551SDag-Erling SmørgravInput lines are made up of fields.
292*bc421551SDag-Erling SmørgravFields are separated from one another by one or more white space characters.
293*bc421551SDag-Erling SmørgravThe white space characters are space, form feed, carriage return, newline,
294*bc421551SDag-Erling Smørgravtab, and vertical tab.
295*bc421551SDag-Erling SmørgravLeading and trailing white space on input lines is ignored.
296*bc421551SDag-Erling SmørgravAn unquoted sharp character (\(sh) in the input introduces a comment which extends
297*bc421551SDag-Erling Smørgravto the end of the line the sharp character appears on.
298*bc421551SDag-Erling SmørgravWhite space characters and sharp characters may be enclosed in double quotes
299*bc421551SDag-Erling Smørgrav(\(dq) if they're to be used as part of a field.
300*bc421551SDag-Erling SmørgravAny line that is blank (after comment stripping) is ignored.
301*bc421551SDag-Erling SmørgravNonblank lines are expected to be of one of three types:
302*bc421551SDag-Erling Smørgravrule lines, zone lines, and link lines.
303*bc421551SDag-Erling Smørgrav.Pp
304*bc421551SDag-Erling SmørgravNames must be in English and are case insensitive.
305*bc421551SDag-Erling SmørgravThey appear in several contexts, and include month and weekday names
306*bc421551SDag-Erling Smørgravand keywords such as
307*bc421551SDag-Erling Smørgrav.Dq "maximum" ,
308*bc421551SDag-Erling Smørgrav.Dq "only" ,
309*bc421551SDag-Erling Smørgrav.Dq "Rolling" ,
310*bc421551SDag-Erling Smørgravand
311*bc421551SDag-Erling Smørgrav.Dq "Zone" .
312*bc421551SDag-Erling SmørgravA name can be abbreviated by omitting all but an initial prefix; any
313*bc421551SDag-Erling Smørgravabbreviation must be unambiguous in context.
314*bc421551SDag-Erling Smørgrav.Pp
315*bc421551SDag-Erling SmørgravA rule line has the form
316*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
317*bc421551SDag-Erling SmørgravRule	NAME	FROM	TO	\-	IN	ON	AT	SAVE	LETTER/S
318*bc421551SDag-Erling Smørgrav.Ed
319*bc421551SDag-Erling Smørgrav.Pp
320*bc421551SDag-Erling SmørgravFor example:
321*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
322*bc421551SDag-Erling SmørgravRule	US	1967	1973	\-	Apr	lastSun	2:00w	1:00d	D
323*bc421551SDag-Erling Smørgrav.Ed
324*bc421551SDag-Erling Smørgrav.Pp
325*bc421551SDag-Erling SmørgravThe fields that make up a rule line are:
326*bc421551SDag-Erling Smørgrav.Bl -tag -width "LETTER/S"
327*bc421551SDag-Erling Smørgrav.It NAME
328*bc421551SDag-Erling SmørgravGives the name of the rule set that contains this line.
329*bc421551SDag-Erling SmørgravThe name must start with a character that is neither
330*bc421551SDag-Erling Smørgravan ASCII digit nor
331*bc421551SDag-Erling Smørgrav.Dq \-
332*bc421551SDag-Erling Smørgravnor
333*bc421551SDag-Erling Smørgrav.Dq + .
334*bc421551SDag-Erling SmørgravTo allow for future extensions,
335*bc421551SDag-Erling Smørgravan unquoted name should not contain characters from the set
336*bc421551SDag-Erling Smørgrav.Dq Ql "!$%&'()*,/:;<=>?@[\]^`{|}~" .
337*bc421551SDag-Erling Smørgrav.It FROM
338*bc421551SDag-Erling SmørgravGives the first year in which the rule applies.
339*bc421551SDag-Erling SmørgravAny signed integer year can be supplied; the proleptic Gregorian calendar
340*bc421551SDag-Erling Smørgravis assumed, with year 0 preceding year 1.
341*bc421551SDag-Erling SmørgravThe word
342*bc421551SDag-Erling Smørgrav.Cm minimum
343*bc421551SDag-Erling Smørgrav(or an abbreviation) means the indefinite past.
344*bc421551SDag-Erling SmørgravThe word
345*bc421551SDag-Erling Smørgrav.Cm maximum
346*bc421551SDag-Erling Smørgrav(or an abbreviation) means the indefinite future.
347*bc421551SDag-Erling SmørgravRules can describe times that are not representable as time values,
348*bc421551SDag-Erling Smørgravwith the unrepresentable times ignored; this allows rules to be portable
349*bc421551SDag-Erling Smørgravamong hosts with differing time value types.
350*bc421551SDag-Erling Smørgrav.It TO
351*bc421551SDag-Erling SmørgravGives the final year in which the rule applies.
352*bc421551SDag-Erling SmørgravIn addition to
353*bc421551SDag-Erling Smørgrav.Cm minimum
354*bc421551SDag-Erling Smørgravand
355*bc421551SDag-Erling Smørgrav.Cm maximum
356*bc421551SDag-Erling Smørgrav(as above),
357*bc421551SDag-Erling Smørgravthe word
358*bc421551SDag-Erling Smørgrav.Cm only
359*bc421551SDag-Erling Smørgrav(or an abbreviation)
360*bc421551SDag-Erling Smørgravmay be used to repeat the value of the
361*bc421551SDag-Erling Smørgrav.Ar FROM
362*bc421551SDag-Erling Smørgravfield.
363*bc421551SDag-Erling Smørgrav.It \-
364*bc421551SDag-Erling SmørgravIs a reserved field and should always contain
365*bc421551SDag-Erling Smørgrav.Ql \-
366*bc421551SDag-Erling Smørgravfor compatibility with older versions of
367*bc421551SDag-Erling Smørgrav.Nm .
368*bc421551SDag-Erling SmørgravIt was previously known as the
369*bc421551SDag-Erling Smørgrav.Ar TYPE
370*bc421551SDag-Erling Smørgravfield, which could contain values to allow a
371*bc421551SDag-Erling Smørgravseparate script to further restrict in which
372*bc421551SDag-Erling Smørgrav.Dq types
373*bc421551SDag-Erling Smørgravof years the rule would apply.
374*bc421551SDag-Erling Smørgrav.It IN
375*bc421551SDag-Erling SmørgravNames the month in which the rule takes effect.
376*bc421551SDag-Erling SmørgravMonth names may be abbreviated.
377*bc421551SDag-Erling Smørgrav.It ON
378*bc421551SDag-Erling SmørgravGives the day on which the rule takes effect.
379*bc421551SDag-Erling SmørgravRecognized forms include:
380*bc421551SDag-Erling Smørgrav.Bl -tag -compact -width "Sun<=25"
381*bc421551SDag-Erling Smørgrav.It 5
382*bc421551SDag-Erling Smørgravthe fifth of the month
383*bc421551SDag-Erling Smørgrav.It lastSun
384*bc421551SDag-Erling Smørgravthe last Sunday in the month
385*bc421551SDag-Erling Smørgrav.It lastMon
386*bc421551SDag-Erling Smørgravthe last Monday in the month
387*bc421551SDag-Erling Smørgrav.It Sun>=8
388*bc421551SDag-Erling Smørgravfirst Sunday on or after the eighth
389*bc421551SDag-Erling Smørgrav.It Sun<=25
390*bc421551SDag-Erling Smørgravlast Sunday on or before the 25th
391*bc421551SDag-Erling Smørgrav.El
392*bc421551SDag-Erling Smørgrav.Pp
393*bc421551SDag-Erling SmørgravA weekday name (e.g.,
394*bc421551SDag-Erling Smørgrav.Ql "Sunday" )
395*bc421551SDag-Erling Smørgravor a weekday name preceded by
396*bc421551SDag-Erling Smørgrav.Dq "last"
397*bc421551SDag-Erling Smørgrav(e.g.,
398*bc421551SDag-Erling Smørgrav.Ql "lastSunday" )
399*bc421551SDag-Erling Smørgravmay be abbreviated or spelled out in full.
400*bc421551SDag-Erling SmørgravThere must be no white space characters within the
401*bc421551SDag-Erling Smørgrav.Ar ON
402*bc421551SDag-Erling Smørgravfield.
403*bc421551SDag-Erling SmørgravThe
404*bc421551SDag-Erling Smørgrav.Dq <=
405*bc421551SDag-Erling Smørgravand
406*bc421551SDag-Erling Smørgrav.Dq >=
407*bc421551SDag-Erling Smørgravconstructs can result in a day in the neighboring month;
408*bc421551SDag-Erling Smørgravfor example, the IN-ON combination
409*bc421551SDag-Erling Smørgrav.Dq "Oct Sun>=31"
410*bc421551SDag-Erling Smørgravstands for the first Sunday on or after October 31,
411*bc421551SDag-Erling Smørgraveven if that Sunday occurs in November.
412*bc421551SDag-Erling Smørgrav.It AT
413*bc421551SDag-Erling SmørgravGives the time of day at which the rule takes effect,
414*bc421551SDag-Erling Smørgravrelative to 00:00, the start of a calendar day.
415*bc421551SDag-Erling SmørgravRecognized forms include:
416*bc421551SDag-Erling Smørgrav.Bl -tag -compact -width "00:19:32.13"
417*bc421551SDag-Erling Smørgrav.It 2
418*bc421551SDag-Erling Smørgravtime in hours
419*bc421551SDag-Erling Smørgrav.It 2:00
420*bc421551SDag-Erling Smørgravtime in hours and minutes
421*bc421551SDag-Erling Smørgrav.It 01:28:14
422*bc421551SDag-Erling Smørgravtime in hours, minutes, and seconds
423*bc421551SDag-Erling Smørgrav.It 00:19:32.13
424*bc421551SDag-Erling Smørgravtime with fractional seconds
425*bc421551SDag-Erling Smørgrav.It 12:00
426*bc421551SDag-Erling Smørgravmidday, 12 hours after 00:00
427*bc421551SDag-Erling Smørgrav.It 15:00
428*bc421551SDag-Erling Smørgrav3 PM, 15 hours after 00:00
429*bc421551SDag-Erling Smørgrav.It 24:00
430*bc421551SDag-Erling Smørgravend of day, 24 hours after 00:00
431*bc421551SDag-Erling Smørgrav.It 260:00
432*bc421551SDag-Erling Smørgrav260 hours after 00:00
433*bc421551SDag-Erling Smørgrav.It \-2:30
434*bc421551SDag-Erling Smørgrav2.5 hours before 00:00
435*bc421551SDag-Erling Smørgrav.It \-
436*bc421551SDag-Erling Smørgravequivalent to 0
437*bc421551SDag-Erling Smørgrav.El
438*bc421551SDag-Erling Smørgrav.Pp
439*bc421551SDag-Erling SmørgravAlthough
440*bc421551SDag-Erling Smørgrav.Nm
441*bc421551SDag-Erling Smørgravrounds times to the nearest integer second
442*bc421551SDag-Erling Smørgrav(breaking ties to the even integer), the fractions may be useful
443*bc421551SDag-Erling Smørgravto other applications requiring greater precision.
444*bc421551SDag-Erling SmørgravThe source format does not specify any maximum precision.
445*bc421551SDag-Erling SmørgravAny of these forms may be followed by the letter
446*bc421551SDag-Erling Smørgrav.Ql w
447*bc421551SDag-Erling Smørgravif the given time is local or
448*bc421551SDag-Erling Smørgrav.Dq "wall clock"
449*bc421551SDag-Erling Smørgravtime,
450*bc421551SDag-Erling Smørgrav.Ql s
451*bc421551SDag-Erling Smørgravif the given time is standard time without any adjustment for daylight saving,
452*bc421551SDag-Erling Smørgravor
453*bc421551SDag-Erling Smørgrav.Ql u
454*bc421551SDag-Erling Smørgrav(or
455*bc421551SDag-Erling Smørgrav.Ql g
456*bc421551SDag-Erling Smørgravor
457*bc421551SDag-Erling Smørgrav.Ql z )
458*bc421551SDag-Erling Smørgravif the given time is universal time;
459*bc421551SDag-Erling Smørgravin the absence of an indicator,
460*bc421551SDag-Erling Smørgravlocal (wall clock) time is assumed.
461*bc421551SDag-Erling SmørgravThese forms ignore leap seconds; for example,
462*bc421551SDag-Erling Smørgravif a leap second occurs at 00:59:60 local time,
463*bc421551SDag-Erling Smørgrav.Ql "1:00"
464*bc421551SDag-Erling Smørgravstands for 3601 seconds after local midnight instead of the usual 3600 seconds.
465*bc421551SDag-Erling SmørgravThe intent is that a rule line describes the instants when a
466*bc421551SDag-Erling Smørgravclock/calendar set to the type of time specified in the
467*bc421551SDag-Erling Smørgrav.Ar AT
468*bc421551SDag-Erling Smørgravfield would show the specified date and time of day.
469*bc421551SDag-Erling Smørgrav.It SAVE
470*bc421551SDag-Erling SmørgravGives the amount of time to be added to local standard time when the rule is in
471*bc421551SDag-Erling Smørgraveffect, and whether the resulting time is standard or daylight saving.
472*bc421551SDag-Erling SmørgravThis field has the same format as the
473*bc421551SDag-Erling Smørgrav.Ar AT
474*bc421551SDag-Erling Smørgravfield
475*bc421551SDag-Erling Smørgravexcept with a different set of suffix letters:
476*bc421551SDag-Erling Smørgrav.Ql s
477*bc421551SDag-Erling Smørgravfor standard time and
478*bc421551SDag-Erling Smørgrav.Ql d
479*bc421551SDag-Erling Smørgravfor daylight saving time.
480*bc421551SDag-Erling SmørgravThe suffix letter is typically omitted, and defaults to
481*bc421551SDag-Erling Smørgrav.Ql s
482*bc421551SDag-Erling Smørgravif the offset is zero and to
483*bc421551SDag-Erling Smørgrav.Ql d
484*bc421551SDag-Erling Smørgravotherwise.
485*bc421551SDag-Erling SmørgravNegative offsets are allowed; in Ireland, for example, daylight saving
486*bc421551SDag-Erling Smørgravtime is observed in winter and has a negative offset relative to
487*bc421551SDag-Erling SmørgravIrish Standard Time.
488*bc421551SDag-Erling SmørgravThe offset is merely added to standard time; for example,
489*bc421551SDag-Erling Smørgrav.Nm
490*bc421551SDag-Erling Smørgravdoes not distinguish a 10:30 standard time plus an 0:30
491*bc421551SDag-Erling Smørgrav.Ar SAVE
492*bc421551SDag-Erling Smørgravfrom a 10:00 standard time plus a 1:00
493*bc421551SDag-Erling Smørgrav.Ar SAVE .
494*bc421551SDag-Erling Smørgrav.It LETTER/S
495*bc421551SDag-Erling SmørgravGives the
496*bc421551SDag-Erling Smørgrav.Dq "variable part"
497*bc421551SDag-Erling Smørgrav(for example, the
498*bc421551SDag-Erling Smørgrav.Dq "S"
499*bc421551SDag-Erling Smørgravor
500*bc421551SDag-Erling Smørgrav.Dq "D"
501*bc421551SDag-Erling Smørgravin
502*bc421551SDag-Erling Smørgrav.Dq "EST"
503*bc421551SDag-Erling Smørgravor
504*bc421551SDag-Erling Smørgrav.Dq "EDT" )
505*bc421551SDag-Erling Smørgravof time zone abbreviations to be used when this rule is in effect.
506*bc421551SDag-Erling SmørgravIf this field is
507*bc421551SDag-Erling Smørgrav.Ql \- ,
508*bc421551SDag-Erling Smørgravthe variable part is null.
509*bc421551SDag-Erling Smørgrav.El
510*bc421551SDag-Erling Smørgrav.Pp
511*bc421551SDag-Erling SmørgravA zone line has the form
512*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
513*bc421551SDag-Erling SmørgravZone	NAME	STDOFF	RULES	FORMAT	[UNTIL]
514*bc421551SDag-Erling Smørgrav.Ed
515*bc421551SDag-Erling Smørgrav.Pp
516*bc421551SDag-Erling SmørgravFor example:
517*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
518*bc421551SDag-Erling SmørgravZone	Asia/Amman	2:00	Jordan	EE%sT	2017 Oct 27 01:00
519*bc421551SDag-Erling Smørgrav.Ed
520*bc421551SDag-Erling Smørgrav.Pp
521*bc421551SDag-Erling SmørgravThe fields that make up a zone line are:
522*bc421551SDag-Erling Smørgrav.Bl -tag -width "STDOFF"
523*bc421551SDag-Erling Smørgrav.It NAME
524*bc421551SDag-Erling SmørgravThe name of the timezone.
525*bc421551SDag-Erling SmørgravThis is the name used in creating the time conversion information file for the
526*bc421551SDag-Erling Smørgravtimezone.
527*bc421551SDag-Erling SmørgravIt should not contain a file name component
528*bc421551SDag-Erling Smørgrav.Dq ".\&"
529*bc421551SDag-Erling Smørgravor
530*bc421551SDag-Erling Smørgrav.Dq ".." ;
531*bc421551SDag-Erling Smørgrava file name component is a maximal substring that does not contain
532*bc421551SDag-Erling Smørgrav.Dq "/" .
533*bc421551SDag-Erling Smørgrav.It STDOFF
534*bc421551SDag-Erling SmørgravThe amount of time to add to UT to get standard time,
535*bc421551SDag-Erling Smørgravwithout any adjustment for daylight saving.
536*bc421551SDag-Erling SmørgravThis field has the same format as the
537*bc421551SDag-Erling Smørgrav.Ar AT
538*bc421551SDag-Erling Smørgravand
539*bc421551SDag-Erling Smørgrav.Ar SAVE
540*bc421551SDag-Erling Smørgravfields of rule lines, except without suffix letters;
541*bc421551SDag-Erling Smørgravbegin the field with a minus sign if time must be subtracted from UT.
542*bc421551SDag-Erling Smørgrav.It RULES
543*bc421551SDag-Erling SmørgravThe name of the rules that apply in the timezone or,
544*bc421551SDag-Erling Smørgravalternatively, a field in the same format as a rule-line SAVE column,
545*bc421551SDag-Erling Smørgravgiving the amount of time to be added to local standard time
546*bc421551SDag-Erling Smørgravand whether the resulting time is standard or daylight saving.
547*bc421551SDag-Erling SmørgravIf this field is
548*bc421551SDag-Erling Smørgrav.Ql \-
549*bc421551SDag-Erling Smørgravthen standard time always applies.
550*bc421551SDag-Erling SmørgravWhen an amount of time is given, only the sum of standard time and
551*bc421551SDag-Erling Smørgravthis amount matters.
552*bc421551SDag-Erling Smørgrav.It FORMAT
553*bc421551SDag-Erling SmørgravThe format for time zone abbreviations.
554*bc421551SDag-Erling SmørgravThe pair of characters
555*bc421551SDag-Erling Smørgrav.Ql %s
556*bc421551SDag-Erling Smørgravis used to show where the
557*bc421551SDag-Erling Smørgrav.Dq "variable part"
558*bc421551SDag-Erling Smørgravof the time zone abbreviation goes.
559*bc421551SDag-Erling SmørgravAlternatively, a format can use the pair of characters
560*bc421551SDag-Erling Smørgrav.Ql %z
561*bc421551SDag-Erling Smørgravto stand for the UT offset in the form
562*bc421551SDag-Erling Smørgrav.Ar \(+- hh ,
563*bc421551SDag-Erling Smørgrav.Ar \(+- hhmm ,
564*bc421551SDag-Erling Smørgravor
565*bc421551SDag-Erling Smørgrav.Ar \(+- hhmmss ,
566*bc421551SDag-Erling Smørgravusing the shortest form that does not lose information, where
567*bc421551SDag-Erling Smørgrav.Ar hh ,
568*bc421551SDag-Erling Smørgrav.Ar mm ,
569*bc421551SDag-Erling Smørgravand
570*bc421551SDag-Erling Smørgrav.Ar ss
571*bc421551SDag-Erling Smørgravare the hours, minutes, and seconds east (+) or west (\-) of UT.
572*bc421551SDag-Erling SmørgravAlternatively,
573*bc421551SDag-Erling Smørgrava slash (/)
574*bc421551SDag-Erling Smørgravseparates standard and daylight abbreviations.
575*bc421551SDag-Erling SmørgravTo conform to POSIX, a time zone abbreviation should contain only
576*bc421551SDag-Erling Smørgravalphanumeric ASCII characters,
577*bc421551SDag-Erling Smørgrav.Ql "+"
578*bc421551SDag-Erling Smørgravand
579*bc421551SDag-Erling Smørgrav.Ql "\-".
580*bc421551SDag-Erling SmørgravBy convention, the time zone abbreviation
581*bc421551SDag-Erling Smørgrav.Ql "\-00"
582*bc421551SDag-Erling Smørgravis a placeholder that means local time is unspecified.
583*bc421551SDag-Erling Smørgrav.It UNTIL
584*bc421551SDag-Erling SmørgravThe time at which the UT offset or the rule(s) change for a location.
585*bc421551SDag-Erling SmørgravIt takes the form of one to four fields
586*bc421551SDag-Erling Smørgrav.Ar YEAR Op Ar MONTH Op Ar DAY Op Ar TIME .
587*bc421551SDag-Erling SmørgravIf this is specified,
588*bc421551SDag-Erling Smørgravthe time zone information is generated from the given UT offset
589*bc421551SDag-Erling Smørgravand rule change until the time specified, which is interpreted using
590*bc421551SDag-Erling Smørgravthe rules in effect just before the transition.
591*bc421551SDag-Erling SmørgravThe month, day, and time of day have the same format as the
592*bc421551SDag-Erling Smørgrav.Ar IN ,
593*bc421551SDag-Erling Smørgrav.Ar ON ,
594*bc421551SDag-Erling Smørgravand
595*bc421551SDag-Erling Smørgrav.Ar AT
596*bc421551SDag-Erling Smørgravfields of a rule; trailing fields can be omitted, and default to the
597*bc421551SDag-Erling Smørgravearliest possible value for the missing fields.
598*bc421551SDag-Erling Smørgrav.IP
599*bc421551SDag-Erling SmørgravThe next line must be a
600*bc421551SDag-Erling Smørgrav.Dq "continuation"
601*bc421551SDag-Erling Smørgravline; this has the same form as a zone line except that the
602*bc421551SDag-Erling Smørgravstring
603*bc421551SDag-Erling Smørgrav.Dq "Zone"
604*bc421551SDag-Erling Smørgravand the name are omitted, as the continuation line will
605*bc421551SDag-Erling Smørgravplace information starting at the time specified as the
606*bc421551SDag-Erling Smørgrav.Dq "until"
607*bc421551SDag-Erling Smørgravinformation in the previous line in the file used by the previous line.
608*bc421551SDag-Erling SmørgravContinuation lines may contain
609*bc421551SDag-Erling Smørgrav.Dq "until"
610*bc421551SDag-Erling Smørgravinformation, just as zone lines do, indicating that the next line is a further
611*bc421551SDag-Erling Smørgravcontinuation.
612*bc421551SDag-Erling Smørgrav.El
613*bc421551SDag-Erling Smørgrav.Pp
614*bc421551SDag-Erling SmørgravIf a zone changes at the same instant that a rule would otherwise take
615*bc421551SDag-Erling Smørgraveffect in the earlier zone or continuation line, the rule is ignored.
616*bc421551SDag-Erling SmørgravA zone or continuation line
617*bc421551SDag-Erling Smørgrav.Ar L
618*bc421551SDag-Erling Smørgravwith a named rule set starts with standard time by default:
619*bc421551SDag-Erling Smørgravthat is, any of
620*bc421551SDag-Erling Smørgrav.Ar L 's
621*bc421551SDag-Erling Smørgravtimestamps preceding
622*bc421551SDag-Erling Smørgrav.Ar L 's
623*bc421551SDag-Erling Smørgravearliest rule use the rule in effect after
624*bc421551SDag-Erling Smørgrav.Ar L 's
625*bc421551SDag-Erling Smørgravfirst transition into standard time.
626*bc421551SDag-Erling SmørgravIn a single zone it is an error if two rules take effect at the same
627*bc421551SDag-Erling Smørgravinstant, or if two zone changes take effect at the same instant.
628*bc421551SDag-Erling Smørgrav.Pp
629*bc421551SDag-Erling SmørgravIf a continuation line subtracts
630*bc421551SDag-Erling Smørgrav.Ar N
631*bc421551SDag-Erling Smørgravseconds from the UT offset after a transition that would be
632*bc421551SDag-Erling Smørgravinterpreted to be later if using the continuation line's UT offset and
633*bc421551SDag-Erling Smørgravrules, the
634*bc421551SDag-Erling Smørgrav.Dq "until"
635*bc421551SDag-Erling Smørgravtime of the previous zone or continuation line is interpreted
636*bc421551SDag-Erling Smørgravaccording to the continuation line's UT offset and rules, and any rule
637*bc421551SDag-Erling Smørgravthat would otherwise take effect in the next
638*bc421551SDag-Erling Smørgrav.Ar N
639*bc421551SDag-Erling Smørgravseconds is instead assumed to take effect simultaneously.
640*bc421551SDag-Erling SmørgravFor example:
641*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
642*bc421551SDag-Erling Smørgrav# Rule	NAME	FROM	TO	\*-	IN	ON	AT	SAVE	LETTER/S
643*bc421551SDag-Erling SmørgravRule	US	1967	2006	-	Oct	lastSun	2:00	0	S
644*bc421551SDag-Erling SmørgravRule	US	1967	1973	-	Apr	lastSun	2:00	1:00	D
645*bc421551SDag-Erling Smørgrav
646*bc421551SDag-Erling Smørgrav# Zone\0\0NAME	STDOFF	RULES	FORMAT	[UNTIL]
647*bc421551SDag-Erling SmørgravZone\0\0America/Menominee	\*-5:00	\*-	EST	1973 Apr 29 2:00
648*bc421551SDag-Erling Smørgrav	\*-6:00	US	C%sT
649*bc421551SDag-Erling Smørgrav.Ed
650*bc421551SDag-Erling SmørgravHere, an incorrect reading would be there were two clock changes on 1973-04-29,
651*bc421551SDag-Erling Smørgravthe first from 02:00 EST (\-05) to 01:00 CST (\-06),
652*bc421551SDag-Erling Smørgravand the second an hour later from 02:00 CST (\-06) to 03:00 CDT (\-05).
653*bc421551SDag-Erling SmørgravHowever,
654*bc421551SDag-Erling Smørgrav.Nm
655*bc421551SDag-Erling Smørgravinterprets this more sensibly as a single transition from 02:00 CST (\-05) to
656*bc421551SDag-Erling Smørgrav02:00 CDT (\-05).
657*bc421551SDag-Erling Smørgrav.Pp
658*bc421551SDag-Erling SmørgravA link line has the form
659*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
660*bc421551SDag-Erling SmørgravLink	TARGET	LINK-NAME
661*bc421551SDag-Erling Smørgrav.Ed
662*bc421551SDag-Erling Smørgrav.Pp
663*bc421551SDag-Erling SmørgravFor example:
664*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
665*bc421551SDag-Erling SmørgravLink	Europe/Istanbul	Asia/Istanbul
666*bc421551SDag-Erling Smørgrav.Ed
667*bc421551SDag-Erling Smørgrav.Pp
668*bc421551SDag-Erling SmørgravThe
669*bc421551SDag-Erling Smørgrav.Ar TARGET
670*bc421551SDag-Erling Smørgravfield should appear as the
671*bc421551SDag-Erling Smørgrav.Ar NAME
672*bc421551SDag-Erling Smørgravfield in some zone line or as the
673*bc421551SDag-Erling Smørgrav.Ar LINK-NAME
674*bc421551SDag-Erling Smørgravfield in some link line.
675*bc421551SDag-Erling SmørgravThe
676*bc421551SDag-Erling Smørgrav.Ar LINK-NAME
677*bc421551SDag-Erling Smørgravfield is used as an alternative name for that zone;
678*bc421551SDag-Erling Smørgravit has the same syntax as a zone line's
679*bc421551SDag-Erling Smørgrav.Ar NAME
680*bc421551SDag-Erling Smørgravfield.
681*bc421551SDag-Erling SmørgravLinks can chain together, although the behavior is unspecified if a
682*bc421551SDag-Erling Smørgravchain of one or more links does not terminate in a Zone name.
683*bc421551SDag-Erling SmørgravA link line can appear before the line that defines the link target.
684*bc421551SDag-Erling SmørgravFor example:
685*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
686*bc421551SDag-Erling SmørgravLink	Greenwich	G_M_T
687*bc421551SDag-Erling SmørgravLink	Etc/GMT	Greenwich
688*bc421551SDag-Erling SmørgravZone	Etc/GMT\0\00\0\0\-\0\0GMT
689*bc421551SDag-Erling Smørgrav.Ed
690*bc421551SDag-Erling Smørgrav.Pp
691*bc421551SDag-Erling SmørgravThe two links are chained together, and G_M_T, Greenwich, and Etc/GMT
692*bc421551SDag-Erling Smørgravall name the same zone.
693*bc421551SDag-Erling Smørgrav.Pp
694*bc421551SDag-Erling SmørgravExcept for continuation lines,
695*bc421551SDag-Erling Smørgravlines may appear in any order in the input.
696*bc421551SDag-Erling SmørgravHowever, the behavior is unspecified if multiple zone or link lines
697*bc421551SDag-Erling Smørgravdefine the same name.
698*bc421551SDag-Erling Smørgrav.Pp
699*bc421551SDag-Erling SmørgravThe file that describes leap seconds can have leap lines and an
700*bc421551SDag-Erling Smørgravexpiration line.
701*bc421551SDag-Erling SmørgravLeap lines have the following form:
702*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
703*bc421551SDag-Erling SmørgravLeap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
704*bc421551SDag-Erling Smørgrav.Ed
705*bc421551SDag-Erling Smørgrav.Pp
706*bc421551SDag-Erling SmørgravFor example:
707*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
708*bc421551SDag-Erling SmørgravLeap	2016	Dec	31	23:59:60	+	S
709*bc421551SDag-Erling Smørgrav.Ed
710*bc421551SDag-Erling Smørgrav.Pp
711*bc421551SDag-Erling SmørgravThe
712*bc421551SDag-Erling Smørgrav.Ar YEAR ,
713*bc421551SDag-Erling Smørgrav.Ar MONTH ,
714*bc421551SDag-Erling Smørgrav.Ar DAY ,
715*bc421551SDag-Erling Smørgravand
716*bc421551SDag-Erling Smørgrav.Ar HH:MM:SS
717*bc421551SDag-Erling Smørgravfields tell when the leap second happened.
718*bc421551SDag-Erling SmørgravThe
719*bc421551SDag-Erling Smørgrav.Ar CORR
720*bc421551SDag-Erling Smørgravfield
721*bc421551SDag-Erling Smørgravshould be
722*bc421551SDag-Erling Smørgrav.Ql "+"
723*bc421551SDag-Erling Smørgravif a second was added
724*bc421551SDag-Erling Smørgravor
725*bc421551SDag-Erling Smørgrav.Ql "\-"
726*bc421551SDag-Erling Smørgravif a second was skipped.
727*bc421551SDag-Erling SmørgravThe
728*bc421551SDag-Erling Smørgrav.Ar R/S
729*bc421551SDag-Erling Smørgravfield
730*bc421551SDag-Erling Smørgravshould be (an abbreviation of)
731*bc421551SDag-Erling Smørgrav.Dq "Stationary"
732*bc421551SDag-Erling Smørgravif the leap second time given by the other fields should be interpreted as UTC
733*bc421551SDag-Erling Smørgravor
734*bc421551SDag-Erling Smørgrav(an abbreviation of)
735*bc421551SDag-Erling Smørgrav.Dq "Rolling"
736*bc421551SDag-Erling Smørgravif the leap second time given by the other fields should be interpreted as
737*bc421551SDag-Erling Smørgravlocal (wall clock) time.
738*bc421551SDag-Erling Smørgrav.Pp
739*bc421551SDag-Erling SmørgravRolling leap seconds were implemented back when it was not
740*bc421551SDag-Erling Smørgravclear whether common practice was rolling or stationary,
741*bc421551SDag-Erling Smørgravwith concerns that one would see
742*bc421551SDag-Erling SmørgravTimes Square ball drops where there'd be a
743*bc421551SDag-Erling Smørgrav.Dq "3... 2... 1... leap... Happy New Year"
744*bc421551SDag-Erling Smørgravcountdown, placing the leap second at
745*bc421551SDag-Erling Smørgravmidnight New York time rather than midnight UTC.
746*bc421551SDag-Erling SmørgravHowever, this countdown style does not seem to have caught on,
747*bc421551SDag-Erling Smørgravwhich means rolling leap seconds are not used in practice;
748*bc421551SDag-Erling Smørgravalso, they are not supported if the
749*bc421551SDag-Erling Smørgrav.Fl r
750*bc421551SDag-Erling Smørgravoption is used.
751*bc421551SDag-Erling Smørgrav.Pp
752*bc421551SDag-Erling SmørgravThe expiration line, if present, has the form:
753*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
754*bc421551SDag-Erling SmørgravExpires	YEAR	MONTH	DAY	HH:MM:SS
755*bc421551SDag-Erling Smørgrav.Ed
756*bc421551SDag-Erling Smørgrav.Pp
757*bc421551SDag-Erling SmørgravFor example:
758*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
759*bc421551SDag-Erling SmørgravExpires	2020	Dec	28	00:00:00
760*bc421551SDag-Erling Smørgrav.Ed
761*bc421551SDag-Erling Smørgrav.Pp
762*bc421551SDag-Erling SmørgravThe
763*bc421551SDag-Erling Smørgrav.Ar YEAR ,
764*bc421551SDag-Erling Smørgrav.Ar MONTH ,
765*bc421551SDag-Erling Smørgrav.Ar DAY ,
766*bc421551SDag-Erling Smørgravand
767*bc421551SDag-Erling Smørgrav.Ar HH:MM:SS
768*bc421551SDag-Erling Smørgravfields give the expiration timestamp in UTC for the leap second table.
769*bc421551SDag-Erling Smørgrav.Sh "EXTENDED EXAMPLE"
770*bc421551SDag-Erling SmørgravHere is an extended example of
771*bc421551SDag-Erling Smørgrav.Nm
772*bc421551SDag-Erling Smørgravinput, intended to illustrate many of its features.
773*bc421551SDag-Erling Smørgrav.Bd -literal -offset indent
774*bc421551SDag-Erling Smørgrav# Rule	NAME	FROM	TO	\-	IN	ON	AT	SAVE	LETTER/S
775*bc421551SDag-Erling SmørgravRule	Swiss	1941	1942	\-	May	Mon>=1	1:00	1:00	S
776*bc421551SDag-Erling SmørgravRule	Swiss	1941	1942	\-	Oct	Mon>=1	2:00	0	\-
777*bc421551SDag-Erling Smørgrav
778*bc421551SDag-Erling SmørgravRule	EU	1977	1980	\-	Apr	Sun>=1	1:00u	1:00	S
779*bc421551SDag-Erling SmørgravRule	EU	1977	only	\-	Sep	lastSun	1:00u	0	\-
780*bc421551SDag-Erling SmørgravRule	EU	1978	only	\-	Oct	 1	1:00u	0	\-
781*bc421551SDag-Erling SmørgravRule	EU	1979	1995	\-	Sep	lastSun	1:00u	0	\-
782*bc421551SDag-Erling SmørgravRule	EU	1981	max	\-	Mar	lastSun	1:00u	1:00	S
783*bc421551SDag-Erling SmørgravRule	EU	1996	max	\-	Oct	lastSun	1:00u	0	\-
784*bc421551SDag-Erling Smørgrav
785*bc421551SDag-Erling Smørgrav# Zone	NAME	STDOFF	RULES	FORMAT	[UNTIL]
786*bc421551SDag-Erling SmørgravZone	Europe/Zurich	0:34:08	\-	LMT	1853 Jul 16
787*bc421551SDag-Erling Smørgrav		0:29:45.50	\-	BMT	1894 Jun
788*bc421551SDag-Erling Smørgrav		1:00	Swiss	CE%sT	1981
789*bc421551SDag-Erling Smørgrav		1:00	EU	CE%sT
790*bc421551SDag-Erling Smørgrav
791*bc421551SDag-Erling SmørgravLink	Europe/Zurich	Europe/Vaduz
792*bc421551SDag-Erling Smørgrav.Ed
793*bc421551SDag-Erling Smørgrav.Pp
794*bc421551SDag-Erling SmørgravIn this example, the EU rules are for the European Union
795*bc421551SDag-Erling Smørgravand for its predecessor organization, the European Communities.
796*bc421551SDag-Erling SmørgravThe timezone is named Europe/Zurich and it has the alias Europe/Vaduz.
797*bc421551SDag-Erling SmørgravThis example says that Zurich was 34 minutes and 8
798*bc421551SDag-Erling Smørgravseconds east of UT until 1853-07-16 at 00:00, when the legal offset
799*bc421551SDag-Erling Smørgravwas changed to
800*bc421551SDag-Erling Smørgrav7\(de26\(fm22.50\(sd,
801*bc421551SDag-Erling Smørgravwhich works out to 0:29:45.50;
802*bc421551SDag-Erling Smørgrav.Nm
803*bc421551SDag-Erling Smørgravtreats this by rounding it to 0:29:46.
804*bc421551SDag-Erling SmørgravAfter 1894-06-01 at 00:00 the UT offset became one hour
805*bc421551SDag-Erling Smørgravand Swiss daylight saving rules (defined with lines beginning with
806*bc421551SDag-Erling Smørgrav.Dq "Rule Swiss")
807*bc421551SDag-Erling Smørgravapply.
808*bc421551SDag-Erling SmørgravFrom 1981 to the present, EU daylight saving rules have
809*bc421551SDag-Erling Smørgravapplied, and the UTC offset has remained at one hour.
810*bc421551SDag-Erling Smørgrav.Pp
811*bc421551SDag-Erling SmørgravIn 1941 and 1942, daylight saving time applied from the first Monday
812*bc421551SDag-Erling Smørgravin May at 01:00 to the first Monday in October at 02:00.
813*bc421551SDag-Erling SmørgravThe pre-1981 EU daylight-saving rules have no effect
814*bc421551SDag-Erling Smørgravhere, but are included for completeness.
815*bc421551SDag-Erling SmørgravSince 1981, daylight
816*bc421551SDag-Erling Smørgravsaving has begun on the last Sunday in March at 01:00 UTC.
817*bc421551SDag-Erling SmørgravUntil 1995 it ended the last Sunday in September at 01:00 UTC,
818*bc421551SDag-Erling Smørgravbut this changed to the last Sunday in October starting in 1996.
819*bc421551SDag-Erling Smørgrav.Pp
820*bc421551SDag-Erling SmørgravFor purposes of display,
821*bc421551SDag-Erling Smørgrav.Dq "LMT"
822*bc421551SDag-Erling Smørgravand
823*bc421551SDag-Erling Smørgrav.Dq "BMT"
824*bc421551SDag-Erling Smørgravwere initially used, respectively.
825*bc421551SDag-Erling SmørgravSince
826*bc421551SDag-Erling SmørgravSwiss rules and later EU rules were applied, the time zone abbreviation
827*bc421551SDag-Erling Smørgravhas been CET for standard time and CEST for daylight saving
828*bc421551SDag-Erling Smørgravtime.
829*bc421551SDag-Erling Smørgrav.Sh FILES
830*bc421551SDag-Erling Smørgrav.Bl -tag -width "/usr/share/zoneinfo"
831*bc421551SDag-Erling Smørgrav.It Pa /etc/localtime
832*bc421551SDag-Erling SmørgravDefault local timezone file.
833*bc421551SDag-Erling Smørgrav.It Pa /usr/share/zoneinfo
834*bc421551SDag-Erling SmørgravDefault timezone information directory.
835*bc421551SDag-Erling Smørgrav.El
836*bc421551SDag-Erling Smørgrav.Sh NOTES
837*bc421551SDag-Erling SmørgravFor areas with more than two types of local time,
838*bc421551SDag-Erling Smørgravyou may need to use local standard time in the
839*bc421551SDag-Erling Smørgrav.Ar AT
840*bc421551SDag-Erling Smørgravfield of the earliest transition time's rule to ensure that
841*bc421551SDag-Erling Smørgravthe earliest transition time recorded in the compiled file is correct.
842*bc421551SDag-Erling Smørgrav.Pp
843*bc421551SDag-Erling SmørgravIf,
844*bc421551SDag-Erling Smørgravfor a particular timezone,
845*bc421551SDag-Erling Smørgrava clock advance caused by the start of daylight saving
846*bc421551SDag-Erling Smørgravcoincides with and is equal to
847*bc421551SDag-Erling Smørgrava clock retreat caused by a change in UT offset,
848*bc421551SDag-Erling Smørgrav.Nm
849*bc421551SDag-Erling Smørgravproduces a single transition to daylight saving at the new UT offset
850*bc421551SDag-Erling Smørgravwithout any change in local (wall clock) time.
851*bc421551SDag-Erling SmørgravTo get separate transitions
852*bc421551SDag-Erling Smørgravuse multiple zone continuation lines
853*bc421551SDag-Erling Smørgravspecifying transition instants using universal time.
854*bc421551SDag-Erling Smørgrav.Sh SEE ALSO
855*bc421551SDag-Erling Smørgrav.Xr tzfile 5 ,
856*bc421551SDag-Erling Smørgrav.Xr zdump 8
857