1.\" $NetBSD: zic.8,v 1.47 2023/12/07 20:13:37 kre 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 December 6, 2023 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.Qq \&\-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 an extended POSIX 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 extended POSIX TZ string. 164This option does not affect the represented timestamps. 165Although it accommodates nonstandard TZif readers 166that ignore the extended POSIX 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 225an extended POSIX 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 229an extended POSIX 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. 359The word 360.Ql minimum 361(or an abbreviation) means the indefinite past. 362The word 363.Ql maximum 364(or an abbreviation) means the indefinite future. 365Rules can describe times that are not representable as time values, 366with the unrepresentable times ignored; this allows rules to be portable 367among hosts with differing time value types. 368.\" 369.It Ar TO 370Gives the final year in which the rule applies. 371In addition to 372.Ql minimum 373and 374.Ql maximum 375(as above), 376the word 377.Ql only 378(or an abbreviation) 379may be used to repeat the value of the 380.Ar FROM 381field. 382.\" 383.It Cm \&\- 384should always be 385.Ql \&\- 386for compatibility with older versions of 387.Nm . 388It was previously known as the 389.Ar TYPE 390field, which could contain values to allow a 391separate script to further restrict in which 392.Qq types 393of years the rule would apply. 394.\" 395.It Ar IN 396Names the month in which the rule takes effect. 397Month names may be abbreviated. 398.\" 399.It Ar ON 400Gives the day on which the rule takes effect. 401Recognized forms include: 402.Pp 403.Bl -tag -width Li -offset indent -compact 404.It Li 5 405the fifth of the month 406.It Li lastSun 407the last Sunday in the month 408.It Li lastMon 409the last Monday in the month 410.It Li Sun>=8 411first Sunday on or after the eighth 412.It Li Sun<=25 413last Sunday on or before the 25th 414.El 415.Pp 416Names of days of the week may be abbreviated or spelled out in full. 417A weekday name (e.g., 418.Ql Sunday ) 419or a weekday name preceded by 420.Ql last 421(e.g., 422.Ql lastSunday ) 423may be abbreviated or spelled out in full. 424There must be no white space characters within the 425.Ar ON 426field. 427The 428.Ql <= 429and 430.Ql >= 431constructs can result in a day in the neighboring month; 432for example, the IN\(enON combination 433.Ql "Oct Sun>=31" 434stands for the first Sunday on or after October 31, 435even if that Sunday occurs in November. 436.\" 437.It Ar AT 438Gives the time of day at which the rule takes effect, 439relative to 00:00, the start of a calendar day. 440Recognized forms include: 441.Pp 442.Bl -tag -width Li -compact -offset indent 443.It Li 2 444time in hours 445.It Li 2:00 446time in hours and minutes 447.It Li 01:28:14 448time in hours, minutes, and seconds 449.It Li 00:19:32.13 450time with fractional seconds 451.It Li 12:00 452midday, 12 hours after 00:00 453.It Li 15:00 4543 455.Tn PM , 45615 hours after 00:00 457.It Li 24:00 458end of day, 24 hours after 00:00 459.It Li 260:00 460260 hours after 00:00 461.It Li \-2:30 4622.5 hours before 00:00 463.It Li \- 464equivalent to 0 465.El 466.Pp 467Although 468.Nm 469rounds times to the nearest integer second 470(breaking ties to the even integer), the fractions may be useful 471to other applications requiring greater precision. 472The source format does not specify any maximum precision. 473Any of these forms may be followed by the letter 474.Ql w 475if the given time is local or 476.Dq wall clock 477time, 478.Ql s 479if the given time is standard time without any adjustment for daylight saving, 480or 481.Ql u 482(or 483.Ql g 484or 485.Ql z ) 486if the given time is universal time; 487in the absence of an indicator, 488local (wall clock) time is assumed. 489These forms ignore leap seconds; for example, 490if a leap second occurs at 00:59:60 local time, 491.Ql "1:00" 492stands for 3601 seconds after local midnight instead of the usual 3600 seconds. 493The intent is that a rule line describes the instants when a 494clock/calendar set to the type of time specified in the 495.Ar AT 496field would show the specified date and time of day. 497.\" 498.It Ar SAVE 499Gives the amount of time to be added to local standard time when the rule is in 500effect, and whether the resulting time is standard or daylight saving. 501This field has the same format as the 502.Ar AT 503field, except with a different set of suffix letters: 504.Ql s 505for standard time and 506.Ql d 507for daylight saving time. 508The suffix letter is typically omitted, and defaults to 509.Ql s 510if the offset is zero and to 511.Ql d 512otherwise. 513Negative offsets are allowed; in Ireland, for example, daylight saving 514time is observed in winter and has a negative offset relative to 515Irish Standard Time. 516The offset is merely added to standard time; for example, 517.Nm 518does not distinguish a 10:30 standard time plus an 0:30 519.Ar SAVE 520from a 10:00 standard time plus a 1:00 521.Ar SAVE . 522.\" 523.It Ar LETTER/S 524Gives the 525.Dq variable part 526(for example, the 527.Ql S 528or 529.Ql D 530in 531.Ql EST 532or 533.Ql EDT ) 534of time zone abbreviations to be used when this rule is in effect. 535If this field is 536.Ql \&\- , 537the variable part is null. 538.El 539.\" 540.\" Zone Line 541.\" 542.Pp 543A 544.Sy zone line 545has the form: 546.Pp 547.Bl -column -compact -offset indent "Zone" "Asia/Amman" "STDOFF" "RULES/SAVE" "FORMAT" "[UNTIL]" 548Zone NAME STDOFF RULES/SAVE FORMAT [UNTIL] 549.El 550.Pp 551For example: 552.Pp 553.Bl -column -compact -offset indent "Zone" "Asia/Amman" "STDOFF" "RULES/SAVE" "FORMAT" "[UNTIL"] 554Zone Asia/Amman 2:00 Jordan EE%sT 2017 Oct 27 1:00 555.El 556.Pp 557The fields that make up a zone line are: 558.Bl -tag -width Ar 559.It Ar NAME 560The name of the timezone. 561This is the name used in creating the time conversion information file for the 562timezone. 563It should not contain a file name component 564.Ql \&. 565or 566.Ql \&.. ; 567a file name component is a maximal substring that does not contain 568.Ql / . 569.\" 570.It Ar STDOFF 571The amount of time to add to UT to get standard time, 572without any adjustment for daylight saving. 573This field has the same format as the 574.Ar AT 575and 576.Ar SAVE 577fields of rule lines, except without suffix letters; 578begin the field with a minus sign if time must be subtracted from UT. 579.\" 580.It Ar RULES 581The name of the rules that apply in the timezone or, 582alternatively, a field in the same format as a rule-line 583.Ar SAVE 584column, giving the amount of time to be added to local standard time 585and whether the resulting time is standard or daylight saving. 586If this field is 587.Ql \&\- 588then standard time always applies. 589When an amount of time is given, only the sum of standard time and 590this amount matters. 591.It Ar FORMAT 592The format for time zone abbreviations. 593The pair of characters 594.Ql %s 595is used to show where the 596.Dq variable part 597of the time zone abbreviation goes. 598Alternatively, a format can use the pair of characters 599.Ql %z 600to stand for the UT offset in the form 601.Pf \(+- Em \^hh , 602.Pf \(+- Em \^hhmm , 603or 604.Pf \(+- Em \^hhmmss , 605using the shortest form that does not lose information, where 606.Em hh , 607.Em mm , 608and 609.Em ss 610are the hours, minutes, and seconds east 611.Pq \&+ 612or west 613.Pq \&\- 614of UT. 615Alternatively, 616a slash 617.Pq Ql \&/ 618separates standard and daylight abbreviations. 619To conform to POSIX, a time zone abbreviation should contain only 620alphanumeric 621.Tn ASCII 622characters, 623.Ql + 624and 625.Ql \&\- . 626By convention, the time zone abbreviation 627.Ql \&\-00 628is a placeholder that means local time is unspecified. 629.\" 630.It Ar UNTIL 631The time at which the UT offset or the rule(s) change for a location. 632It takes the form of one to four fields 633.Ar YEAR Oo 634.Ar MONTH Oo 635.Ar DAY Oo 636.Ar TIME 637.Oc Oc Oc . 638If this is specified, 639the time zone information is generated from the given UT offset 640and rule change until the time specified, which is interpreted using 641the rules in effect just before the transition. 642The month, day, and time of day have the same format as the 643.Ar IN , 644.Ar ON , 645and 646.Ar AT 647fields of a rule; trailing fields can be omitted, and default to the 648earliest possible value for the missing fields. 649.Pp 650The next line must be a 651.Sy continuation line ; 652this has the same form as a zone line except that the string 653.Ql Zone 654and the name are omitted, as the continuation line will 655place information starting at the time specified as the 656.Ar UNTIL 657information in the previous line in the file used by the previous line. 658Continuation lines may contain 659.Ar UNTIL 660information, just as zone lines do, indicating that the next line is a further 661continuation. 662.El 663.Pp 664If a zone changes at the same instant that a rule would otherwise take 665effect in the earlier zone or continuation line, the rule is ignored. 666A zone or continuation line 667.Em L 668with a named rule set starts with standard time by default: 669that is, any of 670.Em L Ap s 671timestamps preceding 672.Em L Ap s 673earliest rule use the rule in effect after 674.Em L Ap s 675first transition into standard time. 676In a single zone it is an error if two rules take effect at the same 677instant, or if two zone changes take effect at the same instant. 678.Pp 679If a continuation line subtracts 680.Ar N 681seconds from the UT offset after a transition that would be 682interpreted to be later if using the continuation line's UT offset and 683rules, the 684.Ar UNTIL 685time of the previous zone or continuation line is interpreted 686according to the continuation line's UT offset and rules, and any rule 687that would otherwise take effect in the next 688.Ar N 689seconds is instead assumed to take effect simultaneously. 690For example: 691.Pp 692.Bl -column -compact -offset indent "# Rule" "NAME" "FROM" "2006" "\&\-" "Oct" "lastSun" "1:00" "SAVE" "LETTER/S" 693.It # Rule NAME FROM TO \&\- IN ON AT SAVE LETTER/S 694.It Rule US 1967 2006 \&\- Oct lastSun 2:00 0 S 695.It Rule US 1967 1973 \&\- Apr lastSun 2:00 1:00 D 696.El 697.Bl -column -compact -offset indent "# Zone" "America/Menominee" "STDOFF" "RULES" "FORMAT" "[UNTIL]" 698.It # Zone NAME STDOFF RULES FORMAT [UNTIL] 699.It Zone America/Menominee \&\-5:00 \&\- EST 1973 Apr 29 2:00 700.It \& \& \&\-6:00 US C%sT 701.El 702.Pp 703Here, an incorrect reading would be there were two clock changes on 1973-04-29, 704the first from 02:00 EST (\&\-05) to 01:00 CST (\&\-06), 705and the second an hour later from 02:00 CST (\&\-06) to 03:00 CDT (\&\-05). 706However, 707.Nm 708interprets this more sensibly as a single transition from 02:00 CST (\&\-05) to 70902:00 CDT (\&\-05). 710.\" 711.\" Link Line 712.\" 713.Pp 714A 715.Sy link line 716has the form 717.Pp 718.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul" 719.It Link TARGET LINK-NAME 720.El 721.Pp 722For example: 723.Pp 724.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul" 725.It Link Europe/Istanbul Asia/Istanbul 726.El 727.Pp 728The 729.Ar TARGET 730field should appear as the 731.Ar NAME 732field in some zone line or as the 733.Ar LINK-NAME 734field in some link line. 735The 736.Ar LINK-NAME 737field is used as an alternative name for that zone; 738it has the same syntax as a zone line's 739.Ar NAME 740field. 741Links can chain together, although the behavior is unspecified if a 742chain of one or more links does not terminate in a Zone name. 743A link line can appear before the line that defines the link target. 744For example: 745.Bl -column -offset indent "Link" "Greenwich" "Greenwich" 746.It Link Greenwich G_M_T 747.It Link Etc/GMT Greenwich 748.It Zone Etc/GMT 0 \- GMT 749.El 750.Pp 751The two links are chained together, and G_M_T, Greenwich, and Etc/GMT 752all name the same zone. 753.Pp 754Except for continuation lines, 755lines may appear in any order in the input. 756However, the behavior is unspecified if multiple zone or link lines 757define the same name. 758.\" 759.Ss Leap second file format 760The file that describes leap seconds can have leap lines and an 761expiration line. 762.\" 763.\" Leap Line 764.\" 765.Sy Leap lines 766have the following form: 767.Pp 768.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S" 769.It Leap YEAR MONTH DAY HH:MM:SS CORR R/S 770.El 771.Pp 772For example: 773.Pp 774.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S" 775.It Leap 2016 Dec 31 23:59:60 + S 776.El 777.Pp 778The 779.Ar YEAR , 780.Ar MONTH , 781.Ar DAY , 782and 783.Ar HH:MM:SS 784fields tell when the leap second happened. 785The 786.Ar CORR 787field 788should be 789.Ql \&+ 790if a second was added or 791.Ql \&\- 792if a second was skipped. 793The 794.Ar R/S 795field 796should be (an abbreviation of) 797.Ql Stationary 798if the leap second time given by the other fields should be interpreted as UTC 799or 800(an abbreviation of) 801.Ql Rolling 802if the leap second time given by the other fields should be interpreted as 803local (wall clock) time. 804.Pp 805Rolling leap seconds were implemented back when it was not 806clear whether common practice was rolling or stationary, 807with concerns that one would see 808Times Square ball drops where there'd be a 809.Qq 3... 2... 1... leap... Happy New Year 810countdown, placing the leap second at 811midnight New York time rather than midnight UTC. 812However, this countdown style does not seem to have caught on, 813which means rolling leap seconds are not used in practice; 814also, they are not supported if the 815.Fl r 816option is used. 817.\" 818.\" Expiration Line 819.\" 820.Pp 821The 822.Sy expiration line , 823if present, has the form: 824.Pp 825.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS" 826.It Expires YEAR MONTH DAY HH:MM:SS 827.El 828.Pp 829For example: 830.Pp 831.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS" 832.It Expires 2020 Dec 28 00:00:00 833.El 834.Pp 835The 836.Em YEAR , 837.Em MONTH , 838.Em DAY , 839and 840.Em HH:MM:SS 841fields give the expiration timestamp in UTC for the leap second table. 842.Sh EXTENDED EXAMPLE 843Here is an extended example of 844.Ic zic 845input, intended to illustrate many of its features. 846.Pp 847.Bl -column -compact -offset indent "# Rule" "Swiss" "FROM" "1995" "\&*" "Oct" "lastSun" "1:00u" "SAVE" "LETTER/S" 848.It # Rule NAME FROM TO \&\- IN ON AT SAVE LETTER/S 849.It Rule Swiss 1941 1942 \&\- May Mon>=1 1:00 1:00 S 850.It Rule Swiss 1941 1942 \&\- Oct Mon>=1 2:00 0 \- 851.Pp 852.It Rule EU 1977 1980 \&\- Apr Sun>=1 1:00u 1:00 S 853.It Rule EU 1977 only \&\- Sep lastSun 1:00u 0 \- 854.It Rule EU 1978 only \&\- Oct 1 1:00u 0 \- 855.It Rule EU 1979 1995 \&\- Sep lastSun 1:00u 0 \- 856.It Rule EU 1981 max \&\- Mar lastSun 1:00u 1:00 S 857.It Rule EU 1996 max \&\- Oct lastSun 1:00u 0 \- 858.El 859.Pp 860.Bl -column -compact -offset indent "# Zone" "Europe/Zurich" "0:29:45.50" "RULES/SAVE" "FORMAT" "UNTIL" 861.It # Zone NAME STDOFF RULES/SAVE FORMAT [UNTIL] 862.It Zone Europe/Zurich 0:34:08 \&\- LMT 1853 Jul 16 863.It 0:29:45.50 \&\- BMT 1894 Jun 864.It 1:00 Swiss CE%sT 1981 865.It 1:00 EU CE%sT 866.Pp 867.El 868.Bl -column -compact -offset indent "# Zone" "Europe/Zurich" "0:34:08" "RULES/SAVE" "FORMAT" "UNTIL" 869.It Link Europe/Zurich Europe/Vaduz 870.El 871.Pp 872In this example, the EU rules are for the European Union 873and for its predecessor organization, the European Communities. 874The timezone is named Europe/Zurich and it has the alias Europe/Vaduz. 875This example says that Zurich was 34 minutes and 8 876seconds east of UT until 1853-07-16 at 00:00, when the legal offset 877was changed to 7\(de\|26\(fm\|22.50\(sd; which this works out to 8780:29:45.50; 879.Nm 880treats this by rounding it to 0:29:46. 881After 1894-06-01 at 00:00 the UT offset became one hour 882and Swiss daylight saving rules (defined with lines beginning with 883.Qq "Rule Swiss" 884apply. 885From 1981 to the present, EU daylight saving rules have 886From 1981 to the present, EU daylight saving rules have 887.Pp 888In 1941 and 1942, daylight saving time applied from the first Monday 889in May at 01:00 to the first Monday in October at 02:00. 890The pre-1981 EU daylight-saving rules have no effect 891here, but are included for completeness. 892Since 1981, daylight 893saving has begun on the last Sunday in March at 01:00 UTC. 894Until 1995 it ended the last Sunday in September at 01:00 UTC, 895but this changed to the last Sunday in October starting in 1996. 896.Pp 897For purposes of display, 898.Qq LMT 899and 900.Qq BMT 901were initially used, respectively. 902Since 903Swiss rules and later EU rules were applied, the time zone abbreviation 904has been CET for standard time and CEST for daylight saving 905time. 906.Sh FILES 907Input files use the format described in this section; output files use 908.Xr tzfile 5 909format. 910.Bl -tag -width Pa -compact 911.It Pa /etc/localtime 912Default local timezone file 913.It Pa /usr/share/zoneinfo 914Default timezone information directory 915.El 916.Sh NOTES 917For areas with more than two types of local time, 918you may need to use local standard time in the 919.Ar AT 920field of the earliest transition time's rule to ensure that 921the earliest transition time recorded in the compiled file is correct. 922.Pp 923If, 924for a particular timezone, 925a clock advance caused by the start of daylight saving 926coincides with and is equal to 927a clock retreat caused by a change in UT offset, 928.Nm 929produces a single transition to daylight saving at the new UT offset 930without any change in local (wall clock) time. 931To get separate transitions 932use multiple zone continuation lines 933specifying transition instants using universal time. 934.Sh SEE ALSO 935.Xr tzfile 5 , 936.Xr zdump 8 937