zic.8 revision 30829
1.Dd 2.Dt ZIC 8 3.Os 4.Sh NAME 5.Nm zic 6.Nd timezone compiler 7.Sh SYNOPSIS 8.Nm zic 9.Op Fl v 10.Op Fl d Ar directory 11.Op Fl l Ar localtime 12.Op Fl p Ar posixrules 13.Op Fl L Ar leapsecondfilename 14.Op Fl s 15.Op Fl y Ar command 16.Op Ar filename ... 17.Sh DESCRIPTION 18.Nm Zic 19reads text from the file(s) named on the command line 20and creates the time conversion information files specified in this input. 21If a 22.Ar filename 23is 24.Em - , 25the standard input is read. 26.Pp 27The following options are available: 28.Bl -tag -width indent 29.It Fl d Ar directory 30Create time conversion information files in the named directory rather than 31in the standard directory named below. 32.It Fl l Ar timezone 33Use the given 34.Ar time zone 35as local time. 36.Nm Zic 37will act as if the input contained a link line of the form 38.sp 39.ti +.5i 40Link \fItimezone\fP localtime 41.It Fl p Ar timezone 42Use the given 43.Ar "time zone" Ns 's 44rules when handling POSIX-format 45time zone environment variables. 46.Nm Zic 47will act as if the input contained a link line of the form 48.sp 49.ti +.5i 50Link \fItimezone\fP posixrules 51.It Fl L Ar leapsecondfilename 52Read leap second information from the file with the given name. 53If this option is not used, 54no leap second information appears in output files. 55.It Fl v 56Complain if a year that appears in a data file is outside the range 57of years representable by 58.Xr time 2 59values. 60.It Fl s 61Limit time values stored in output files to values that are the same 62whether they're taken to be signed or unsigned. 63You can use this option to generate SVVS-compatible files. 64.It Fl y Ar command 65Use the given 66.Ar command 67rather than 68.Em yearistype 69when checking year types (see below). 70.El 71.Pp 72Input lines are made up of fields. 73Fields are separated from one another by any number of white space characters. 74Leading and trailing white space on input lines is ignored. 75An unquoted sharp character (#) in the input introduces a comment which extends 76to the end of the line the sharp character appears on. 77White space characters and sharp characters may be enclosed in double quotes 78(") if they're to be used as part of a field. 79Any line that is blank (after comment stripping) is ignored. 80Non-blank lines are expected to be of one of three types: 81rule lines, zone lines, and link lines. 82.Pp 83A rule line has the form 84.nf 85.ti +.5i 86.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u 87.sp 88Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S 89.sp 90For example: 91.ti +.5i 92.sp 93Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D 94.sp 95.fi 96The fields that make up a rule line are: 97.Bl -tag -width indent 98.It NAME 99Give the (arbitrary) name of the set of rules this rule is part of. 100.It FROM 101Give the first year in which the rule applies. 102Any integer year can be supplied; the Gregorian calendar is assumed. 103The word 104.Em minimum 105(or an abbreviation) means the minimum year representable as an integer. 106The word 107.Em maximum 108(or an abbreviation) means the maximum year representable as an integer. 109Rules can describe times that are not representable as time values, 110with the unrepresentable times ignored; this allows rules to be portable 111among hosts with differing time value types. 112.It TO 113Give the final year in which the rule applies. 114In addition to 115.Em minimum 116and 117.Em maximum 118(as above), 119the word 120.Em only 121(or an abbreviation) 122may be used to repeat the value of the 123.Em FROM 124field. 125.It TYPE 126Give the type of year in which the rule applies. 127If 128.Em TYPE 129is 130.Em \- 131then the rule applies in all years between 132.Em FROM 133and 134.Em TO 135inclusive. 136If 137.Em TYPE 138is something else, then 139.Nm 140executes the command 141.ti +.5i 142\fByearistype\fP \fIyear\fP \fItype\fP 143.br 144to check the type of a year: 145an exit status of zero is taken to mean that the year is of the given type; 146an exit status of one is taken to mean that the year is not of the given type. 147.It IN 148Name the month in which the rule takes effect. 149Month names may be abbreviated. 150.It ON 151Give the day on which the rule takes effect. 152Recognized forms include: 153.nf 154.in +.5i 155.sp 156.ta \w'Sun<=25\0\0'u 1575 the fifth of the month 158lastSun the last Sunday in the month 159lastMon the last Monday in the month 160Sun>=8 first Sunday on or after the eighth 161Sun<=25 last Sunday on or before the 25th 162.fi 163.in -.5i 164.sp 165Names of days of the week may be abbreviated or spelled out in full. 166Note that there must be no spaces within the 167.Em ON 168field. 169.It AT 170Give the time of day at which the rule takes effect. 171Recognized forms include: 172.nf 173.in +.5i 174.sp 175.ta \w'1:28:13\0\0'u 1762 time in hours 1772:00 time in hours and minutes 17815:00 24-hour format time (for times after noon) 1791:28:14 time in hours, minutes, and seconds 180.fi 181.in -.5i 182.sp 183Any of these forms may be followed by the letter 184.Em w 185if the given time is local 186.q "wall clock" 187time, 188.Em s 189if the given time is local 190.q standard 191time, or 192.Em u 193(or 194.Em g 195or 196.Em z ) 197if the given time is universal time; 198in the absence of an indicator, 199wall clock time is assumed. 200.It SAVE 201Give the amount of time to be added to local standard time when the rule is in 202effect. 203This field has the same format as the 204.Em AT 205field 206(although, of course, the 207.Em w 208and 209.Em s 210suffixes are not used). 211.It LETTER/S 212Give the 213.q "variable part" 214(for example, the 215.q S 216or 217.q D 218in 219.q EST 220or 221.q EDT ) 222of time zone abbreviations to be used when this rule is in effect. 223If this field is 224.Em \- , 225the variable part is null. 226.El 227.Pp 228A zone line has the form 229.sp 230.nf 231.ti +.5i 232.ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u 233Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] 234.sp 235For example: 236.sp 237.ti +.5i 238Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 239.sp 240.fi 241The fields that make up a zone line are: 242.Bl -tag -width indent 243.It NAME 244The name of the time zone. 245This is the name used in creating the time conversion information file for the 246zone. 247.It GMTOFF 248The amount of time to add to GMT to get standard time in this zone. 249This field has the same format as the 250.Em AT 251and 252.Em SAVE 253fields of rule lines; 254begin the field with a minus sign if time must be subtracted from GMT. 255.It RULES/SAVE 256The name of the rule(s) that apply in the time zone or, 257alternately, an amount of time to add to local standard time. 258If this field is 259.Em \- 260then standard time always applies in the time zone. 261.It FORMAT 262The format for time zone abbreviations in this time zone. 263The pair of characters 264.Em %s 265is used to show where the 266.q "variable part" 267of the time zone abbreviation goes. 268Alternately, 269a slash (/) 270separates standard and daylight abbreviations. 271.It UNTIL 272The time at which the GMT offset or the rule(s) change for a location. 273It is specified as a year, a month, a day, and a time of day. 274If this is specified, 275the time zone information is generated from the given GMT offset 276and rule change until the time specified. 277.Pp 278The next line must be a 279.q continuation 280line; this has the same form as a zone line except that the 281string 282.q Zone 283and the name are omitted, as the continuation line will 284place information starting at the time specified as the 285.Em UNTIL 286field in the previous line in the file used by the previous line. 287Continuation lines may contain an 288.Em UNTIL 289field, just as zone lines do, indicating that the next line is a further 290continuation. 291.El 292.Pp 293A link line has the form 294.sp 295.nf 296.ti +.5i 297.ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u 298Link LINK-FROM LINK-TO 299.sp 300For example: 301.sp 302.ti +.5i 303Link Europe/Istanbul Asia/Istanbul 304.sp 305.fi 306The 307.Em LINK-FROM 308field should appear as the 309.Em NAME 310field in some zone line; 311the 312.Em LINK-TO 313field is used as an alternate name for that zone. 314.Pp 315Except for continuation lines, 316lines may appear in any order in the input. 317.Pp 318Lines in the file that describes leap seconds have the following form: 319.nf 320.ti +.5i 321.ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u 322.sp 323Leap YEAR MONTH DAY HH:MM:SS CORR R/S 324.sp 325For example: 326.ti +.5i 327.sp 328Leap 1974 Dec 31 23:59:60 + S 329.sp 330.fi 331The 332.Em YEAR , 333.Em MONTH , 334.Em DAY , 335and 336.Em HH:MM:SS 337fields tell when the leap second happened. 338The 339.Em CORR 340field 341should be 342.q + 343if a second was added 344or 345.q - 346if a second was skipped. 347.\" There's no need to document the following, since it's impossible for more 348.\" than one leap second to be inserted or deleted at a time. 349.\" The C Standard is in error in suggesting the possibility. 350.\" See Terry J Quinn, The BIPM and the accurate measure of time, 351.\" Proc IEEE 79, 7 (July 1991), 894-905. 352.\" or 353.\" .q ++ 354.\" if two seconds were added 355.\" or 356.\" .q -- 357.\" if two seconds were skipped. 358The 359.Em R/S 360field 361should be (an abbreviation of) 362.q Stationary 363if the leap second time given by the other fields should be interpreted as GMT 364or 365(an abbreviation of) 366.q Rolling 367if the leap second time given by the other fields should be interpreted as 368local wall clock time. 369.Sh NOTE 370For areas with more than two types of local time, 371you may need to use local standard time in the 372.Em AT 373field of the earliest transition time's rule to ensure that 374the earliest transition time recorded in the compiled file is correct. 375.Sh FILE 376.Bl -tag -width /usr/share/zoneinfo -compact 377/usr/share/zoneinfo standard directory used for created files 378.El 379.Sh "SEE ALSO" 380.Xr ctime 3 , 381.Xr tzfile 5 , 382.Xr zdump 8 383.\" @(#)zic.8 7.12 384