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