1.\" $NetBSD: zic.8,v 1.50 2024/02/17 14:54:47 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 February 17, 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 an extended POSIX.1-2017 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.1-2017 TZ string. 164This option does not affect the represented timestamps. 165Although it accommodates nonstandard TZif readers 166that ignore the extended POSIX.1-2017 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.1-2017 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.1-2017 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 575column, giving the amount of time to be added to local standard time 576and whether the resulting time is standard or daylight saving. 577If this field is 578.Ql \&\- 579then standard time always applies. 580When an amount of time is given, only the sum of standard time and 581this amount matters. 582.It Ar FORMAT 583The format for time zone abbreviations. 584The pair of characters 585.Ql %s 586is used to show where the 587.Dq variable part 588of the time zone abbreviation goes. 589Alternatively, a format can use the pair of characters 590.Ql %z 591to stand for the UT offset in the form 592.Pf \(+- Em \^hh , 593.Pf \(+- Em \^hhmm , 594or 595.Pf \(+- Em \^hhmmss , 596using the shortest form that does not lose information, where 597.Em hh , 598.Em mm , 599and 600.Em ss 601are the hours, minutes, and seconds east 602.Pq \&+ 603or west 604.Pq \&\- 605of UT. 606Alternatively, 607a slash 608.Pq Ql \&/ 609separates standard and daylight abbreviations. 610To conform to POSIX, a time zone abbreviation should contain only 611alphanumeric 612.Tn ASCII 613characters, 614.Ql + 615and 616.Ql \&\- . 617By convention, the time zone abbreviation 618.Ql \&\-00 619is a placeholder that means local time is unspecified. 620.\" 621.It Ar UNTIL 622The time at which the UT offset or the rule(s) change for a location. 623It takes the form of one to four fields 624.Ar YEAR Oo 625.Ar MONTH Oo 626.Ar DAY Oo 627.Ar TIME 628.Oc Oc Oc . 629If this is specified, 630the time zone information is generated from the given UT offset 631and rule change until the time specified, which is interpreted using 632the rules in effect just before the transition. 633The month, day, and time of day have the same format as the 634.Ar IN , 635.Ar ON , 636and 637.Ar AT 638fields of a rule; trailing fields can be omitted, and default to the 639earliest possible value for the missing fields. 640.Pp 641The next line must be a 642.Sy continuation line ; 643this has the same form as a zone line except that the string 644.Ql Zone 645and the name are omitted, as the continuation line will 646place information starting at the time specified as the 647.Ar UNTIL 648information in the previous line in the file used by the previous line. 649Continuation lines may contain 650.Ar UNTIL 651information, just as zone lines do, indicating that the next line is a further 652continuation. 653.El 654.Pp 655If a zone changes at the same instant that a rule would otherwise take 656effect in the earlier zone or continuation line, the rule is ignored. 657A zone or continuation line 658.Em L 659with a named rule set starts with standard time by default: 660that is, any of 661.Em L Ap s 662timestamps preceding 663.Em L Ap s 664earliest rule use the rule in effect after 665.Em L Ap s 666first transition into standard time. 667In a single zone it is an error if two rules take effect at the same 668instant, or if two zone changes take effect at the same instant. 669.Pp 670If a continuation line subtracts 671.Ar N 672seconds from the UT offset after a transition that would be 673interpreted to be later if using the continuation line's UT offset and 674rules, the 675.Ar UNTIL 676time of the previous zone or continuation line is interpreted 677according to the continuation line's UT offset and rules, and any rule 678that would otherwise take effect in the next 679.Ar N 680seconds is instead assumed to take effect simultaneously. 681For example: 682.Pp 683.Bl -column -compact -offset indent "# Rule" "NAME" "FROM" "2006" "\&\-" "Oct" "lastSun" "1:00" "SAVE" "LETTER/S" 684.It # Rule NAME FROM TO \&\- IN ON AT SAVE LETTER/S 685.It Rule US 1967 2006 \&\- Oct lastSun 2:00 0 S 686.It Rule US 1967 1973 \&\- Apr lastSun 2:00 1:00 D 687.El 688.Bl -column -compact -offset indent "# Zone" "America/Menominee" "STDOFF" "RULES" "FORMAT" "[UNTIL]" 689.It # Zone NAME STDOFF RULES FORMAT [UNTIL] 690.It Zone America/Menominee \&\-5:00 \&\- EST 1973 Apr 29 2:00 691.It \& \& \&\-6:00 US C%sT 692.El 693.Pp 694Here, an incorrect reading would be there were two clock changes on 1973-04-29, 695the first from 02:00 EST (\&\-05) to 01:00 CST (\&\-06), 696and the second an hour later from 02:00 CST (\&\-06) to 03:00 CDT (\&\-05). 697However, 698.Nm 699interprets this more sensibly as a single transition from 02:00 CST (\&\-05) to 70002:00 CDT (\&\-05). 701.\" 702.\" Link Line 703.\" 704.Pp 705A 706.Sy link line 707has the form 708.Pp 709.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul" 710.It Link TARGET LINK-NAME 711.El 712.Pp 713For example: 714.Pp 715.Bl -column -compact -offset indent "Link" "Europe/Istanbul" "Asia/Istanbul" 716.It Link Europe/Istanbul Asia/Istanbul 717.El 718.Pp 719The 720.Ar TARGET 721field should appear as the 722.Ar NAME 723field in some zone line or as the 724.Ar LINK-NAME 725field in some link line. 726The 727.Ar LINK-NAME 728field is used as an alternative name for that zone; 729it has the same syntax as a zone line's 730.Ar NAME 731field. 732Links can chain together, although the behavior is unspecified if a 733chain of one or more links does not terminate in a Zone name. 734A link line can appear before the line that defines the link target. 735For example: 736.Bl -column -offset indent "Link" "Greenwich" "Greenwich" 737.It Link Greenwich G_M_T 738.It Link Etc/GMT Greenwich 739.It Zone Etc/GMT 0 \- GMT 740.El 741.Pp 742The two links are chained together, and G_M_T, Greenwich, and Etc/GMT 743all name the same zone. 744.Pp 745Except for continuation lines, 746lines may appear in any order in the input. 747However, the behavior is unspecified if multiple zone or link lines 748define the same name. 749.\" 750.Ss Leap second file format 751The file that describes leap seconds can have leap lines and an 752expiration line. 753.\" 754.\" Leap Line 755.\" 756.Sy Leap lines 757have the following form: 758.Pp 759.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S" 760.It Leap YEAR MONTH DAY HH:MM:SS CORR R/S 761.El 762.Pp 763For example: 764.Pp 765.Bl -column -compat -offset indent "Leap" "YEAR" "MONTH" "DAY" "HH:MM:SS" "CORR""R/S" 766.It Leap 2016 Dec 31 23:59:60 + S 767.El 768.Pp 769The 770.Ar YEAR , 771.Ar MONTH , 772.Ar DAY , 773and 774.Ar HH:MM:SS 775fields tell when the leap second happened. 776The 777.Ar CORR 778field 779should be 780.Ql \&+ 781if a second was added or 782.Ql \&\- 783if a second was skipped. 784The 785.Ar R/S 786field 787should be (an abbreviation of) 788.Ql Stationary 789if the leap second time given by the other fields should be interpreted as UTC 790or 791(an abbreviation of) 792.Ql Rolling 793if the leap second time given by the other fields should be interpreted as 794local (wall clock) time. 795.Pp 796Rolling leap seconds were implemented back when it was not 797clear whether common practice was rolling or stationary, 798with concerns that one would see 799Times Square ball drops where there'd be a 800.Qq 3... 2... 1... leap... Happy New Year 801countdown, placing the leap second at 802midnight New York time rather than midnight UTC. 803However, this countdown style does not seem to have caught on, 804which means rolling leap seconds are not used in practice; 805also, they are not supported if the 806.Fl r 807option is used. 808.\" 809.\" Expiration Line 810.\" 811.Pp 812The 813.Sy expiration line , 814if present, has the form: 815.Pp 816.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS" 817.It Expires YEAR MONTH DAY HH:MM:SS 818.El 819.Pp 820For example: 821.Pp 822.Bl -column -compact -offset indent "Expires" "YEAR" "MONTH" "DAY" "HH:MM:SS" 823.It Expires 2020 Dec 28 00:00:00 824.El 825.Pp 826The 827.Em YEAR , 828.Em MONTH , 829.Em DAY , 830and 831.Em HH:MM:SS 832fields give the expiration timestamp in UTC for the leap second table. 833.Sh EXTENDED EXAMPLE 834Here is an extended example of 835.Ic zic 836input, intended to illustrate many of its features. 837.Pp 838.Bl -column -compact -offset indent "# Rule" "Swiss" "FROM" "1995" "\&*" "Oct" "lastSun" "1:00u" "SAVE" "LETTER/S" 839.It # Rule NAME FROM TO \&\- IN ON AT SAVE LETTER/S 840.It Rule Swiss 1941 1942 \&\- May Mon>=1 1:00 1:00 S 841.It Rule Swiss 1941 1942 \&\- Oct Mon>=1 2:00 0 \- 842.Pp 843.It Rule EU 1977 1980 \&\- Apr Sun>=1 1:00u 1:00 S 844.It Rule EU 1977 only \&\- Sep lastSun 1:00u 0 \- 845.It Rule EU 1978 only \&\- Oct 1 1:00u 0 \- 846.It Rule EU 1979 1995 \&\- Sep lastSun 1:00u 0 \- 847.It Rule EU 1981 max \&\- Mar lastSun 1:00u 1:00 S 848.It Rule EU 1996 max \&\- Oct lastSun 1:00u 0 \- 849.El 850.Pp 851.Bl -column -compact -offset indent "# Zone" "Europe/Zurich" "0:29:45.50" "RULES/SAVE" "FORMAT" "UNTIL" 852.It # Zone NAME STDOFF RULES/SAVE FORMAT [UNTIL] 853.It Zone Europe/Zurich 0:34:08 \&\- LMT 1853 Jul 16 854.It 0:29:45.50 \&\- BMT 1894 Jun 855.It 1:00 Swiss CE%sT 1981 856.It 1:00 EU CE%sT 857.Pp 858.El 859.Bl -column -compact -offset indent "# Zone" "Europe/Zurich" "0:34:08" "RULES/SAVE" "FORMAT" "UNTIL" 860.It Link Europe/Zurich Europe/Vaduz 861.El 862.Pp 863In this example, the EU rules are for the European Union 864and for its predecessor organization, the European Communities. 865The timezone is named Europe/Zurich and it has the alias Europe/Vaduz. 866This example says that Zurich was 34 minutes and 8 867seconds east of UT until 1853-07-16 at 00:00, when the legal offset 868was changed to 7\(de\|26\(fm\|22.50\(sd; which this works out to 8690:29:45.50; 870.Nm 871treats this by rounding it to 0:29:46. 872After 1894-06-01 at 00:00 the UT offset became one hour 873and Swiss daylight saving rules (defined with lines beginning with 874.Qq "Rule Swiss" 875apply. 876From 1981 to the present, EU daylight saving rules have 877applied, and the UTC offset has remained at one hour. 878.Pp 879In 1941 and 1942, daylight saving time applied from the first Monday 880in May at 01:00 to the first Monday in October at 02:00. 881The pre-1981 EU daylight-saving rules have no effect 882here, but are included for completeness. 883Since 1981, daylight 884saving has begun on the last Sunday in March at 01:00 UTC. 885Until 1995 it ended the last Sunday in September at 01:00 UTC, 886but this changed to the last Sunday in October starting in 1996. 887.Pp 888For purposes of display, 889.Qq LMT 890and 891.Qq BMT 892were initially used, respectively. 893Since 894Swiss rules and later EU rules were applied, the time zone abbreviation 895has been CET for standard time and CEST for daylight saving 896time. 897.Sh FILES 898Input files use the format described in this section; output files use 899.Xr tzfile 5 900format. 901.Bl -tag -width Pa -compact 902.It Pa /etc/localtime 903Default local timezone file 904.It Pa /usr/share/zoneinfo 905Default timezone information directory 906.El 907.Sh NOTES 908For areas with more than two types of local time, 909you may need to use local standard time in the 910.Ar AT 911field of the earliest transition time's rule to ensure that 912the earliest transition time recorded in the compiled file is correct. 913.Pp 914If, 915for a particular timezone, 916a clock advance caused by the start of daylight saving 917coincides with and is equal to 918a clock retreat caused by a change in UT offset, 919.Nm 920produces a single transition to daylight saving at the new UT offset 921without any change in local (wall clock) time. 922To get separate transitions 923use multiple zone continuation lines 924specifying transition instants using universal time. 925.Sh SEE ALSO 926.Xr tzfile 5 , 927.Xr zdump 8 928