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