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