]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man8/zic.8
man*/: srcfix (Use .P instead of .PP or .LP)
[thirdparty/man-pages.git] / man8 / zic.8
1 .\" This file is in the public domain, so clarified as of
2 .\" 2009-05-17 by Arthur David Olson.
3 .TH zic 8 "" "Time Zone Database"
4 .SH NAME
5 zic \- timezone compiler
6 .SH SYNOPSIS
7 .B zic
8 [
9 .I option
10 \&... ] [
11 .I filename
12 \&... ]
13 .SH DESCRIPTION
14 .ie '\(lq'' .ds lq \&"\"
15 .el .ds lq \(lq\"
16 .ie '\(rq'' .ds rq \&"\"
17 .el .ds rq \(rq\"
18 .de q
19 \\$3\*(lq\\$1\*(rq\\$2
20 ..
21 .ie '\(la'' .ds < <
22 .el .ds < \(la
23 .ie '\(ra'' .ds > >
24 .el .ds > \(ra
25 .ie \n(.g \{\
26 . ds : \:
27 . ds - \f(CR-\fP
28 .\}
29 .el \{\
30 . ds :
31 . ds - \-
32 .\}
33 .ds d " degrees
34 .ds m " minutes
35 .ds s " seconds
36 .ds _ " \&
37 .if t \{\
38 . if \n(.g .if c \(de .if c \(fm .if c \(sd \{\
39 . ds d \(de
40 . ds m \(fm
41 . ds s \(sd
42 . ds _ \|
43 . \}
44 .\}
45 The
46 .B zic
47 program reads text from the file(s) named on the command line
48 and creates the timezone information format (TZif) files
49 specified in this input.
50 If a
51 .I filename
52 is
53 .q "\*-" ,
54 standard input is read.
55 .SH OPTIONS
56 .TP
57 .B "\*-\*-version"
58 Output version information and exit.
59 .TP
60 .B \*-\*-help
61 Output short usage message and exit.
62 .TP
63 .BI "\*-b " bloat
64 Output backward-compatibility data as specified by
65 .IR bloat .
66 If
67 .I bloat
68 is
69 .BR fat ,
70 generate additional data entries that work around potential bugs or
71 incompatibilities in older software, such as software that mishandles
72 the 64-bit generated data.
73 If
74 .I bloat
75 is
76 .BR slim ,
77 keep the output files small; this can help check for the bugs
78 and incompatibilities.
79 The default is
80 .BR slim ,
81 as software that mishandles 64-bit data typically
82 mishandles timestamps after the year 2038 anyway.
83 Also see the
84 .B \*-r
85 option for another way to alter output size.
86 .TP
87 .BI "\*-d " directory
88 Create time conversion information files in the named directory rather than
89 in the standard directory named below.
90 .TP
91 .BI "\*-l " timezone
92 Use
93 .I timezone
94 as local time.
95 .B zic
96 will act as if the input contained a link line of the form
97 .sp
98 .ti +.5i
99 .ta \w'Link\0\0'u +\w'\fItimezone\fP\0\0'u
100 Link \fItimezone\fP localtime
101 .sp
102 If
103 .I timezone
104 is
105 .BR \*- ,
106 any already-existing link is removed.
107 .TP
108 .BI "\*-L " leapsecondfilename
109 Read leap second information from the file with the given name.
110 If this option is not used,
111 no leap second information appears in output files.
112 .TP
113 .BI "\*-p " timezone
114 Use
115 .IR timezone 's
116 rules when handling nonstandard
117 TZ strings like "EET\*-2EEST" that lack transition rules.
118 .B zic
119 will act as if the input contained a link line of the form
120 .sp
121 .ti +.5i
122 Link \fItimezone\fP posixrules
123 .sp
124 Unless
125 .I timezone is
126 .q "\*-" ,
127 this option is obsolete and poorly supported.
128 Among other things it should not be used for timestamps after the year 2037,
129 and it should not be combined with
130 .B "\*-b slim"
131 if
132 .IR timezone 's
133 transitions are at standard time or Universal Time (UT) instead of local time.
134 .sp
135 If
136 .I timezone
137 is
138 .BR \*- ,
139 any already-existing link is removed.
140 .TP
141 .BR "\*-r " "[\fB@\fP\fIlo\fP][\fB/@\fP\fIhi\fP]"
142 Limit the applicability of output files
143 to timestamps in the range from
144 .I lo
145 (inclusive) to
146 .I hi
147 (exclusive), where
148 .I lo
149 and
150 .I hi
151 are possibly signed decimal counts of seconds since the Epoch
152 (1970-01-01 00:00:00 UTC).
153 Omitted counts default to extreme values.
154 The output files use UT offset 0 and abbreviation
155 .q "\*-00"
156 in place of the omitted timestamp data.
157 For example,
158 .q "zic \*-r @0"
159 omits data intended for negative timestamps (i.e., before the Epoch), and
160 .q "zic \*-r @0/@2147483648"
161 outputs data intended only for nonnegative timestamps that fit into
162 31-bit signed integers.
163 On platforms with GNU
164 .BR date ,
165 .q "zic \*-r @$(date +%s)"
166 omits data intended for past timestamps.
167 Although this option typically reduces the output file's size,
168 the size can increase due to the need to represent the timestamp range
169 boundaries, particularly if
170 .I hi
171 causes a TZif file to contain explicit entries for
172 .RI pre- hi
173 transitions rather than concisely representing them
174 with an extended POSIX TZ string.
175 Also see the
176 .B "\*-b slim"
177 option for another way to shrink output size.
178 .TP
179 .BI "\*-R @" hi
180 Generate redundant trailing explicit transitions for timestamps
181 that occur less than
182 .I hi
183 seconds since the Epoch, even though the transitions could be
184 more concisely represented via the extended POSIX TZ string.
185 This option does not affect the represented timestamps.
186 Although it accommodates nonstandard TZif readers
187 that ignore the extended POSIX TZ string,
188 it increases the size of the altered output files.
189 .TP
190 .BI "\*-t " file
191 When creating local time information, put the configuration link in
192 the named file rather than in the standard location.
193 .TP
194 .B \*-v
195 Be more verbose, and complain about the following situations:
196 .RS
197 .P
198 The input specifies a link to a link,
199 something not supported by some older parsers, including
200 .B zic
201 itself through release 2022e.
202 .P
203 A year that appears in a data file is outside the range
204 of representable years.
205 .P
206 A time of 24:00 or more appears in the input.
207 Pre-1998 versions of
208 .B zic
209 prohibit 24:00, and pre-2007 versions prohibit times greater than 24:00.
210 .P
211 A rule goes past the start or end of the month.
212 Pre-2004 versions of
213 .B zic
214 prohibit this.
215 .P
216 A time zone abbreviation uses a
217 .B %z
218 format.
219 Pre-2015 versions of
220 .B zic
221 do not support this.
222 .P
223 A timestamp contains fractional seconds.
224 Pre-2018 versions of
225 .B zic
226 do not support this.
227 .P
228 The input contains abbreviations that are mishandled by pre-2018 versions of
229 .B zic
230 due to a longstanding coding bug.
231 These abbreviations include
232 .q L
233 for
234 .q Link ,
235 .q mi
236 for
237 .q min ,
238 .q Sa
239 for
240 .q Sat ,
241 and
242 .q Su
243 for
244 .q Sun .
245 .P
246 The output file does not contain all the information about the
247 long-term future of a timezone, because the future cannot be summarized as
248 an extended POSIX TZ string. For example, as of 2023 this problem
249 occurs for Morocco's daylight-saving rules, as these rules are based
250 on predictions for when Ramadan will be observed, something that
251 an extended POSIX TZ string cannot represent.
252 .P
253 The output contains data that may not be handled properly by client
254 code designed for older
255 .B zic
256 output formats. These compatibility issues affect only timestamps
257 before 1970 or after the start of 2038.
258 .P
259 The output contains a truncated leap second table,
260 which can cause some older TZif readers to misbehave.
261 This can occur if the
262 .B "\*-L"
263 option is used, and either an Expires line is present or
264 the
265 .B "\*-r"
266 option is also used.
267 .P
268 The output file contains more than 1200 transitions,
269 which may be mishandled by some clients.
270 The current reference client supports at most 2000 transitions;
271 pre-2014 versions of the reference client support at most 1200
272 transitions.
273 .P
274 A time zone abbreviation has fewer than 3 or more than 6 characters.
275 POSIX requires at least 3, and requires implementations to support
276 at least 6.
277 .P
278 An output file name contains a byte that is not an ASCII letter,
279 .q "\*-" ,
280 .q "/" ,
281 or
282 .q "_" ;
283 or it contains a file name component that contains more than 14 bytes
284 or that starts with
285 .q "\*-" .
286 .RE
287 .SH FILES
288 Input files use the format described in this section; output files use
289 .BR tzfile (5)
290 format.
291 .P
292 Input files should be text files, that is, they should be a series of
293 zero or more lines, each ending in a newline byte and containing at
294 most 2048 bytes counting the newline, and without any NUL bytes.
295 The input text's encoding
296 is typically UTF-8 or ASCII; it should have a unibyte representation
297 for the POSIX Portable Character Set (PPCS)
298 \*<https://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
299 and the encoding's non-unibyte characters should consist entirely of
300 non-PPCS bytes. Non-PPCS characters typically occur only in comments:
301 although output file names and time zone abbreviations can contain
302 nearly any character, other software will work better if these are
303 limited to the restricted syntax described under the
304 .B \*-v
305 option.
306 .P
307 Input lines are made up of fields.
308 Fields are separated from one another by one or more white space characters.
309 The white space characters are space, form feed, carriage return, newline,
310 tab, and vertical tab.
311 Leading and trailing white space on input lines is ignored.
312 An unquoted sharp character (#) in the input introduces a comment which extends
313 to the end of the line the sharp character appears on.
314 White space characters and sharp characters may be enclosed in double quotes
315 (") if they're to be used as part of a field.
316 Any line that is blank (after comment stripping) is ignored.
317 Nonblank lines are expected to be of one of three types:
318 rule lines, zone lines, and link lines.
319 .P
320 Names must be in English and are case insensitive.
321 They appear in several contexts, and include month and weekday names
322 and keywords such as
323 .BR "maximum" ,
324 .BR "only" ,
325 .BR "Rolling" ,
326 and
327 .BR "Zone" .
328 A name can be abbreviated by omitting all but an initial prefix; any
329 abbreviation must be unambiguous in context.
330 .P
331 A rule line has the form
332 .nf
333 .ti +.5i
334 .ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
335 .sp
336 Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
337 .sp
338 For example:
339 .ti +.5i
340 .sp
341 Rule US 1967 1973 \*- Apr lastSun 2:00w 1:00d D
342 .sp
343 .fi
344 The fields that make up a rule line are:
345 .TP "\w'LETTER/S'u"
346 .B NAME
347 Gives the name of the rule set that contains this line.
348 The name must start with a character that is neither
349 an ASCII digit nor
350 .q \*-
351 nor
352 .q + .
353 To allow for future extensions,
354 an unquoted name should not contain characters from the set
355 .ie \n(.g .q \f(CR!$%&\(aq()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
356 .el .ie t .q \f(CW!$%&'()*,/:;<=>?@[\e]^\(ga{|}~\fP .
357 .el .q !$%&'()*,/:;<=>?@[\e]^`{|}~ .
358 .TP
359 .B FROM
360 Gives the first year in which the rule applies.
361 Any signed integer year can be supplied; the proleptic Gregorian calendar
362 is assumed, with year 0 preceding year 1.
363 The word
364 .B minimum
365 (or an abbreviation) means the indefinite past.
366 The word
367 .B maximum
368 (or an abbreviation) means the indefinite future.
369 Rules can describe times that are not representable as time values,
370 with the unrepresentable times ignored; this allows rules to be portable
371 among hosts with differing time value types.
372 .TP
373 .B TO
374 Gives the final year in which the rule applies.
375 In addition to
376 .B minimum
377 and
378 .B maximum
379 (as above),
380 the word
381 .B only
382 (or an abbreviation)
383 may be used to repeat the value of the
384 .B FROM
385 field.
386 .TP
387 .B \*-
388 Is a reserved field and should always contain
389 .q \*-
390 for compatibility with older versions of
391 .BR zic .
392 It was previously known as the
393 .B TYPE
394 field, which could contain values to allow a
395 separate script to further restrict in which
396 .q types
397 of years the rule would apply.
398 .TP
399 .B IN
400 Names the month in which the rule takes effect.
401 Month names may be abbreviated.
402 .TP
403 .B ON
404 Gives the day on which the rule takes effect.
405 Recognized forms include:
406 .nf
407 .in +.5i
408 .sp
409 .ta \w'Sun<=25\0\0'u
410 5 the fifth of the month
411 lastSun the last Sunday in the month
412 lastMon the last Monday in the month
413 Sun>=8 first Sunday on or after the eighth
414 Sun<=25 last Sunday on or before the 25th
415 .fi
416 .in -.5i
417 .sp
418 A weekday name (e.g.,
419 .BR "Sunday" )
420 or a weekday name preceded by
421 .q "last"
422 (e.g.,
423 .BR "lastSunday" )
424 may be abbreviated or spelled out in full.
425 There must be no white space characters within the
426 .B ON
427 field.
428 The
429 .q <=
430 and
431 .q >=
432 constructs can result in a day in the neighboring month;
433 for example, the IN-ON combination
434 .q "Oct Sun>=31"
435 stands for the first Sunday on or after October 31,
436 even if that Sunday occurs in November.
437 .TP
438 .B AT
439 Gives the time of day at which the rule takes effect,
440 relative to 00:00, the start of a calendar day.
441 Recognized forms include:
442 .nf
443 .in +.5i
444 .sp
445 .ta \w'00:19:32.13\0\0'u
446 2 time in hours
447 2:00 time in hours and minutes
448 01:28:14 time in hours, minutes, and seconds
449 00:19:32.13 time with fractional seconds
450 12:00 midday, 12 hours after 00:00
451 15:00 3 PM, 15 hours after 00:00
452 24:00 end of day, 24 hours after 00:00
453 260:00 260 hours after 00:00
454 \*-2:30 2.5 hours before 00:00
455 \*- equivalent to 0
456 .fi
457 .in -.5i
458 .sp
459 Although
460 .B zic
461 rounds times to the nearest integer second
462 (breaking ties to the even integer), the fractions may be useful
463 to other applications requiring greater precision.
464 The source format does not specify any maximum precision.
465 Any of these forms may be followed by the letter
466 .B w
467 if the given time is local or
468 .q "wall clock"
469 time,
470 .B s
471 if the given time is standard time without any adjustment for daylight saving,
472 or
473 .B u
474 (or
475 .B g
476 or
477 .BR z )
478 if the given time is universal time;
479 in the absence of an indicator,
480 local (wall clock) time is assumed.
481 These forms ignore leap seconds; for example,
482 if a leap second occurs at 00:59:60 local time,
483 .q "1:00"
484 stands for 3601 seconds after local midnight instead of the usual 3600 seconds.
485 The intent is that a rule line describes the instants when a
486 clock/calendar set to the type of time specified in the
487 .B AT
488 field would show the specified date and time of day.
489 .TP
490 .B SAVE
491 Gives the amount of time to be added to local standard time when the rule is in
492 effect, and whether the resulting time is standard or daylight saving.
493 This field has the same format as the
494 .B AT
495 field
496 except with a different set of suffix letters:
497 .B s
498 for standard time and
499 .B d
500 for daylight saving time.
501 The suffix letter is typically omitted, and defaults to
502 .B s
503 if the offset is zero and to
504 .B d
505 otherwise.
506 Negative offsets are allowed; in Ireland, for example, daylight saving
507 time is observed in winter and has a negative offset relative to
508 Irish Standard Time.
509 The offset is merely added to standard time; for example,
510 .B zic
511 does not distinguish a 10:30 standard time plus an 0:30
512 .B SAVE
513 from a 10:00 standard time plus a 1:00
514 .BR SAVE .
515 .TP
516 .B LETTER/S
517 Gives the
518 .q "variable part"
519 (for example, the
520 .q "S"
521 or
522 .q "D"
523 in
524 .q "EST"
525 or
526 .q "EDT" )
527 of time zone abbreviations to be used when this rule is in effect.
528 If this field is
529 .q \*- ,
530 the variable part is null.
531 .P
532 A zone line has the form
533 .sp
534 .nf
535 .ti +.5i
536 .ta \w'Zone\0\0'u +\w'Asia/Amman\0\0'u +\w'STDOFF\0\0'u +\w'Jordan\0\0'u +\w'FORMAT\0\0'u
537 Zone NAME STDOFF RULES FORMAT [UNTIL]
538 .sp
539 For example:
540 .sp
541 .ti +.5i
542 Zone Asia/Amman 2:00 Jordan EE%sT 2017 Oct 27 01:00
543 .sp
544 .fi
545 The fields that make up a zone line are:
546 .TP "\w'STDOFF'u"
547 .B NAME
548 The name of the timezone.
549 This is the name used in creating the time conversion information file for the
550 timezone.
551 It should not contain a file name component
552 .q ".\&"
553 or
554 .q ".." ;
555 a file name component is a maximal substring that does not contain
556 .q "/" .
557 .TP
558 .B STDOFF
559 The amount of time to add to UT to get standard time,
560 without any adjustment for daylight saving.
561 This field has the same format as the
562 .B AT
563 and
564 .B SAVE
565 fields of rule lines, except without suffix letters;
566 begin the field with a minus sign if time must be subtracted from UT.
567 .TP
568 .B RULES
569 The name of the rules that apply in the timezone or,
570 alternatively, a field in the same format as a rule-line SAVE column,
571 giving the amount of time to be added to local standard time
572 and whether the resulting time is standard or daylight saving.
573 If this field is
574 .B \*-
575 then standard time always applies.
576 When an amount of time is given, only the sum of standard time and
577 this amount matters.
578 .TP
579 .B FORMAT
580 The format for time zone abbreviations.
581 The pair of characters
582 .B %s
583 is used to show where the
584 .q "variable part"
585 of the time zone abbreviation goes.
586 Alternatively, a format can use the pair of characters
587 .B %z
588 to stand for the UT offset in the form
589 .RI \(+- hh ,
590 .RI \(+- hhmm ,
591 or
592 .RI \(+- hhmmss ,
593 using the shortest form that does not lose information, where
594 .IR hh ,
595 .IR mm ,
596 and
597 .I ss
598 are the hours, minutes, and seconds east (+) or west (\-) of UT.
599 Alternatively,
600 a slash (/)
601 separates standard and daylight abbreviations.
602 To conform to POSIX, a time zone abbreviation should contain only
603 alphanumeric ASCII characters,
604 .q "+"
605 and
606 .q "\*-".
607 By convention, the time zone abbreviation
608 .q "\*-00"
609 is a placeholder that means local time is unspecified.
610 .TP
611 .B UNTIL
612 The time at which the UT offset or the rule(s) change for a location.
613 It takes the form of one to four fields YEAR [MONTH [DAY [TIME]]].
614 If this is specified,
615 the time zone information is generated from the given UT offset
616 and rule change until the time specified, which is interpreted using
617 the rules in effect just before the transition.
618 The month, day, and time of day have the same format as the IN, ON, and AT
619 fields of a rule; trailing fields can be omitted, and default to the
620 earliest possible value for the missing fields.
621 .IP
622 The next line must be a
623 .q "continuation"
624 line; this has the same form as a zone line except that the
625 string
626 .q "Zone"
627 and the name are omitted, as the continuation line will
628 place information starting at the time specified as the
629 .q "until"
630 information in the previous line in the file used by the previous line.
631 Continuation lines may contain
632 .q "until"
633 information, just as zone lines do, indicating that the next line is a further
634 continuation.
635 .P
636 If a zone changes at the same instant that a rule would otherwise take
637 effect in the earlier zone or continuation line, the rule is ignored.
638 A zone or continuation line
639 .I L
640 with a named rule set starts with standard time by default:
641 that is, any of
642 .IR L 's
643 timestamps preceding
644 .IR L 's
645 earliest rule use the rule in effect after
646 .IR L 's
647 first transition into standard time.
648 In a single zone it is an error if two rules take effect at the same
649 instant, or if two zone changes take effect at the same instant.
650 .P
651 If a continuation line subtracts
652 .I N
653 seconds from the UT offset after a transition that would be
654 interpreted to be later if using the continuation line's UT offset and
655 rules, the
656 .q "until"
657 time of the previous zone or continuation line is interpreted
658 according to the continuation line's UT offset and rules, and any rule
659 that would otherwise take effect in the next
660 .I N
661 seconds is instead assumed to take effect simultaneously.
662 For example:
663 .br
664 .ne 7
665 .nf
666 .in +2m
667 .ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'2006\0\0'u +\w'\*-\0\0'u +\w'Oct\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
668 .sp
669 # Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
670 Rule US 1967 2006 - Oct lastSun 2:00 0 S
671 Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
672 .ta \w'Zone\0\0America/Menominee\0\0'u +\w'STDOFF\0\0'u +\w'RULES\0\0'u +\w'FORMAT\0\0'u
673 # Zone\0\0NAME STDOFF RULES FORMAT [UNTIL]
674 Zone\0\0America/Menominee \*-5:00 \*- EST 1973 Apr 29 2:00
675 \*-6:00 US C%sT
676 .sp
677 .in
678 .fi
679 Here, an incorrect reading would be there were two clock changes on 1973-04-29,
680 the first from 02:00 EST (\*-05) to 01:00 CST (\*-06),
681 and the second an hour later from 02:00 CST (\*-06) to 03:00 CDT (\*-05).
682 However,
683 .B zic
684 interprets this more sensibly as a single transition from 02:00 CST (\*-05) to
685 02:00 CDT (\*-05).
686 .P
687 A link line has the form
688 .sp
689 .nf
690 .ti +.5i
691 .ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u
692 Link TARGET LINK-NAME
693 .sp
694 For example:
695 .sp
696 .ti +.5i
697 Link Europe/Istanbul Asia/Istanbul
698 .sp
699 .fi
700 The
701 .B TARGET
702 field should appear as the
703 .B NAME
704 field in some zone line or as the
705 .B LINK-NAME
706 field in some link line.
707 The
708 .B LINK-NAME
709 field is used as an alternative name for that zone;
710 it has the same syntax as a zone line's
711 .B NAME
712 field.
713 Links can chain together, although the behavior is unspecified if a
714 chain of one or more links does not terminate in a Zone name.
715 A link line can appear before the line that defines the link target.
716 For example:
717 .sp
718 .ne 3
719 .nf
720 .in +2m
721 .ta \w'Zone\0\0'u +\w'Greenwich\0\0'u
722 Link Greenwich G_M_T
723 Link Etc/GMT Greenwich
724 Zone Etc/GMT\0\00\0\0\*-\0\0GMT
725 .sp
726 .in
727 .fi
728 The two links are chained together, and G_M_T, Greenwich, and Etc/GMT
729 all name the same zone.
730 .P
731 Except for continuation lines,
732 lines may appear in any order in the input.
733 However, the behavior is unspecified if multiple zone or link lines
734 define the same name.
735 .P
736 The file that describes leap seconds can have leap lines and an
737 expiration line.
738 Leap lines have the following form:
739 .nf
740 .ti +.5i
741 .ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u
742 .sp
743 Leap YEAR MONTH DAY HH:MM:SS CORR R/S
744 .sp
745 For example:
746 .ti +.5i
747 .sp
748 Leap 2016 Dec 31 23:59:60 + S
749 .sp
750 .fi
751 The
752 .BR YEAR ,
753 .BR MONTH ,
754 .BR DAY ,
755 and
756 .B HH:MM:SS
757 fields tell when the leap second happened.
758 The
759 .B CORR
760 field
761 should be
762 .q "+"
763 if a second was added
764 or
765 .q "\*-"
766 if a second was skipped.
767 The
768 .B R/S
769 field
770 should be (an abbreviation of)
771 .q "Stationary"
772 if the leap second time given by the other fields should be interpreted as UTC
773 or
774 (an abbreviation of)
775 .q "Rolling"
776 if the leap second time given by the other fields should be interpreted as
777 local (wall clock) time.
778 .P
779 Rolling leap seconds were implemented back when it was not
780 clear whether common practice was rolling or stationary,
781 with concerns that one would see
782 Times Square ball drops where there'd be a
783 .q "3... 2... 1... leap... Happy New Year"
784 countdown, placing the leap second at
785 midnight New York time rather than midnight UTC.
786 However, this countdown style does not seem to have caught on,
787 which means rolling leap seconds are not used in practice;
788 also, they are not supported if the
789 .B \*-r
790 option is used.
791 .P
792 The expiration line, if present, has the form:
793 .nf
794 .ti +.5i
795 .ta \w'Expires\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u
796 .sp
797 Expires YEAR MONTH DAY HH:MM:SS
798 .sp
799 For example:
800 .ti +.5i
801 .sp
802 Expires 2020 Dec 28 00:00:00
803 .sp
804 .fi
805 The
806 .BR YEAR ,
807 .BR MONTH ,
808 .BR DAY ,
809 and
810 .B HH:MM:SS
811 fields give the expiration timestamp in UTC for the leap second table.
812 .br
813 .ne 22
814 .SH "EXTENDED EXAMPLE"
815 Here is an extended example of
816 .B zic
817 input, intended to illustrate many of its features.
818 .nf
819 .in +2m
820 .ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
821 .sp
822 # Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
823 Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S
824 Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*-
825 .sp .5
826 Rule EU 1977 1980 \*- Apr Sun>=1 1:00u 1:00 S
827 Rule EU 1977 only \*- Sep lastSun 1:00u 0 \*-
828 Rule EU 1978 only \*- Oct 1 1:00u 0 \*-
829 Rule EU 1979 1995 \*- Sep lastSun 1:00u 0 \*-
830 Rule EU 1981 max \*- Mar lastSun 1:00u 1:00 S
831 Rule EU 1996 max \*- Oct lastSun 1:00u 0 \*-
832 .sp
833 .ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'0:29:45.50\0\0'u +\w'RULES\0\0'u +\w'FORMAT\0\0'u
834 # Zone NAME STDOFF RULES FORMAT [UNTIL]
835 Zone Europe/Zurich 0:34:08 \*- LMT 1853 Jul 16
836 0:29:45.50 \*- BMT 1894 Jun
837 1:00 Swiss CE%sT 1981
838 1:00 EU CE%sT
839 .sp
840 Link Europe/Zurich Europe/Vaduz
841 .sp
842 .in
843 .fi
844 In this example, the EU rules are for the European Union
845 and for its predecessor organization, the European Communities.
846 The timezone is named Europe/Zurich and it has the alias Europe/Vaduz.
847 This example says that Zurich was 34 minutes and 8
848 seconds east of UT until 1853-07-16 at 00:00, when the legal offset
849 was changed to
850 7\*d\*_26\*m\*_22.50\*s,
851 which works out to 0:29:45.50;
852 .B zic
853 treats this by rounding it to 0:29:46.
854 After 1894-06-01 at 00:00 the UT offset became one hour
855 and Swiss daylight saving rules (defined with lines beginning with
856 .q "Rule Swiss")
857 apply. From 1981 to the present, EU daylight saving rules have
858 applied, and the UTC offset has remained at one hour.
859 .P
860 In 1941 and 1942, daylight saving time applied from the first Monday
861 in May at 01:00 to the first Monday in October at 02:00.
862 The pre-1981 EU daylight-saving rules have no effect
863 here, but are included for completeness. Since 1981, daylight
864 saving has begun on the last Sunday in March at 01:00 UTC.
865 Until 1995 it ended the last Sunday in September at 01:00 UTC,
866 but this changed to the last Sunday in October starting in 1996.
867 .P
868 For purposes of display,
869 .q "LMT"
870 and
871 .q "BMT"
872 were initially used, respectively. Since
873 Swiss rules and later EU rules were applied, the time zone abbreviation
874 has been CET for standard time and CEST for daylight saving
875 time.
876 .SH FILES
877 .TP
878 .I /etc/localtime
879 Default local timezone file.
880 .TP
881 .I /usr/share/zoneinfo
882 Default timezone information directory.
883 .SH NOTES
884 For areas with more than two types of local time,
885 you may need to use local standard time in the
886 .B AT
887 field of the earliest transition time's rule to ensure that
888 the earliest transition time recorded in the compiled file is correct.
889 .P
890 If,
891 for a particular timezone,
892 a clock advance caused by the start of daylight saving
893 coincides with and is equal to
894 a clock retreat caused by a change in UT offset,
895 .B zic
896 produces a single transition to daylight saving at the new UT offset
897 without any change in local (wall clock) time.
898 To get separate transitions
899 use multiple zone continuation lines
900 specifying transition instants using universal time.
901 .SH SEE ALSO
902 .BR tzfile (5),
903 .BR zdump (8)