tzic(1M) tzic(1M)NAME tzic - compiles time-zone information files that are required to set the local time-zone SYNOPSIS tzic [-d directory] [-l localtime-link] [-L leap-file] [-p posixrules-link] [-s] [-v] [source-file]... ARGUMENTS -d directory Creates time-zone information files in directory rather than in the standard directory /etc/timezone. -l localtime-link Establishes the file localtime-link as a link to /etc/posixrules once it has been compiled. The named file must also be present in one of the zone specification lines in one of your source-files. This option has the same effect as including a link line of the following form in one of your source-files. Link localtime-link localtime -L leap-file Reads leap-second instruction lines from the file with the given name. If you omit this command option, the information file created will not include the codes necessary to make adjustments for years that would normally have leap seconds associated with them. -p posixrules-link Establishes the file posixrules-link as a link to /etc/posixrules once it has been compiled. The named file must also be present in one of the zone- specification lines inside one of your source files. This option has the same effect as including a link line of the following form in one of your source-files. Link posixrules-link posixrules -s Limits time values stored in output files to values that are the same whether they are taken to be signed or unsigned. You can use this option to generate files compatible with the System V file system (SVFS). source-file Specifies the file or files that contain the high-level tzic instructions you want translated into machine- readable data. If the value of source-file is -, the standard input is read. -v Displays an error message if the source file contains a January 1992 1
tzic(1M) tzic(1M)year that is outside the range of years representable by time(2) values. DESCRIPTION tzic is used to compile one or more time-zone information files through which the local time-zone can be established as described in settimezone(1M). The time-zone information files are read by system programs that perform processing based on the system time. For the sake of efficiency, the format of these files is a binary one. Accordingly, they are not files that you can display or edit normally. To create new time-zone information files to override or complement the existing ones, you must use tzic in much the same way as programmers use the C compiler to produce executable command files: A source file contains the displayable and editable instructions that are later processed by a compiler, resulting in a translation of your instructions into machine-executable codes that are microprocessor-specific. If one of the supplied time-zone information files can be used to keep the correct local time, then you should simply use settimezone to choose the correct time-zone information file to be used. If none of the supplied time-zone information files can be used to keep the correct local time year-round, then you must resort to either (1) resetting the time yourself (as described in date(1)) whenever necessary to accommodate local policies such as local daylight-savings time; or (2) you must learn which of the high-level instructions you need to use to describe local time policies, and then run tzic to translate those instructions into a time-zone information file that can be placed in /etc/zoneinfo and linked to /etc/localtime as described in settimezone(1M). Creating Source Files The source files contain high-level instructions to be translated into binary format and placed in output files. Four basic types of high-level instructions can be provided: (1) rules lines, (2) zone-specification lines, (3) link lines, and (4) leap lines. Lines can appear in any order in the source files. For each zone specification you include in the input instructions, a time-zone information file is created. Each file created contains a representation of the time-zone rules you specified in a machine-readable form. This binary file format is required because all the programs that perform processing, dependent on the system time (such as date), anticipate this format. 2 January 1992
tzic(1M) tzic(1M)If you don't specify the -d option and an appropriate argument, tzic overwrites any existing files with the same names as those you have assigned to certain instruction lines known as zone specification lines. If the supplied time-zone rules do not match the local time policies at a given site, you should use zone-specification lines. Lexical Considerations Each of the four types of input lines is made up of fields. Field values are delimited by any number of space characters. Leading and trailing spaces on input lines are ignored. An unquoted number sign (#) in the input introduces a comment that extends to the end of the line in which it appears. Enclose space characters and number sign in double quotation marks (") to use them as part of a field. Any line that is blank after comment stripping is ignored. Non-blank lines are expected to be of one of three types: rule lines, zone lines, and link lines. The sections that follow describe each type of line. Rule Lines A rule line has this form: Rule rule-tag begin-year end-year qualifier begin-month begin-day begin-time added-time abbrev-substring Here is an example: Rule USA 1969 1973 - Apr lastSun 2:00 1:00 D The first field of a rule line is the keyword Rule. You can use any of the following values in the fields following Rule. rule-tag Specifies an arbitrary name. When used thoughtfully, rule-tag values help organize sets of rules, such as all the rules for a given time-zone or similarly treated time-zones. begin-year Specifies the first year for which the rule applies. Its value can be a numeric entry, one of the keywords minimum or maximum, or the min and max abbreviations for those keywords. If the minimum keyword is used, the range starts with the earliest year that can be represented in the data structures employed. If the maximum keyword is used, the range starts with the last year that can be represented in the data structures employed. end-year January 1992 3
tzic(1M) tzic(1M)Specifies the final year for which the rule applies. Its value can be a numeric entry, minimum or maximum as described in begin-year, or the keyword only. If the only keyword is used, the end year is set to the same value as that of the begin-year field. qualifier Determines whether a year within the specified range qualifies for use with this rule line. If its value is a hyphen (-), then the rule applies in all years between begin-year and end-year, inclusive. If the value of qualifier is one of the keywords uspres or nonpres, the rule applies or does not apply in United States presidential election years. If the value of qualifier is a keyword other than these, tzic executes this command to check the type of year: yearistype year qualifier In such cases, you must make sure that the yearistype command exists, that it is executable, that it can be located through the PATH setting passed to tzic, and that it performs as desired for one or more qualifier values. An exit status of 0 means that the year is of the given type; an exit status of 1 means that the year is not of the given type. begin-month Specifies the month in which the rule begins to take effect. You can abbreviate month names to two letters, if you wish. begin-day The day on which the rule takes effect. Here is a list of recognized forms: day weekday weekday op day Here, op is a comparison operator, such as >=, <=, >, <, or =. Thus, all of the following forms are legal: 5 The fifth of the month lastSun The last Sunday in the month lastMon The last Monday in the month Sun>=8 The first Sunday on or after the 8th Sun<=25 The last Sunday on or before the 25th You can abbreviate the names of days to two letters, if 4 January 1992
tzic(1M) tzic(1M)you wish. Note that there must be no spaces within the begin-day field. begin-time The time of day at which the rule begins to take effect. Here are the recognized forms: hh hh:mm hh:mm:ss Here, hh is specified in 24-hour time format. Thus, all of the following forms are legal: 2 Time in hours 2:00 Time in hours and minutes 15:00 24-hour time format (times after noon) 1:28:14 Time in hours, minutes, and seconds You can follow any of these forms with the letter w if the given time is local time or s if the given time is local standard time. In the absence of w or s, local time is assumed. added-time The time to be added to local standard time when the rule is in effect. This field has the same format as the begin-time field, but the w and s suffixes are not used. abbrev-substring The ``variable part'' (for example, the S or D in EST or EDT) of time-zone abbreviations to be used when this rule is in effect. If the value of this field is a hyphen (-), the substring is 0 characters. Zone Lines One or more zone lines together form one zone specification that fully describes how a particular time-zone is to be treated. The most important field is the one that references rules by their tag names. (See ``Rule Lines'' earlier in the ``Description'' section.) A zone specification has this form: Zone timezone-name [contd-line]... gmt-increment qualification abbrev A multiple-line zone specification has continuation lines, each with its own newline character, of this form: gmt-increment qualification abbrev expiration January 1992 5
tzic(1M) tzic(1M)Here is an example of a single-line zone specification: Zone Australia/South-west 9:30 Aus CST You can use any of the following replacement values in the fields following Zone: timezone-name The name of the time-zone that is being described in this line and any continuation lines that follow. This name becomes the name of the time-zone information file created. Embedded slashes (/) turn the name into a pathname. Note that any directories within the pathname are not automatically created by tzic. To avoid errors, ensure that any necessary directories exist with the correct permissions before running tzic. gmt-increment The amount of time to add to Greenwich mean time (GMT) to get standard time in this zone. This field has the same format as the begin-time and added-time fields of rule lines. (See ``Rule Lines'' earlier.) The field must begin with a minus sign if time must be subtracted from GMT. qualification The name of any rule(s) that apply in the time-zone or, alternately, an amount of time to add to local standard time. If this field is a hyphen (-), then standard time always applies in the time-zone. When more than one rule applies simultaneously, each should be separated by spaces and the entire list should be enclosed in quotation marks. abbrev The format for time-zone abbreviations in this time- zone. The pair of characters %s is used to show where the abbrev-substring given in one or more rules must be placed inside of the time-zone abbreviation. (See ``Rule Lines'' earlier in the ``Description'' section.) expiration The time at which the gmt-increment value must change or when the rule(s) given within the qualification field for a location must change. This value is specified as a year, a month, a day, and a time of day in this form: year month day hh:mm:ss If this value is specified, then the duration of time 6 January 1992
tzic(1M) tzic(1M)in which the time-zone information is generated based on the given GMT offset and given rules remains in effect until this time is reached, at which point the next zone line should give instructions for the handling of the time-zone. The inclusion of this field value in a zone line forces the next line to become a ``continuation'' of the zone specification. Continuation lines have the same form as zone lines except that the strings Zone and timezone-name are omitted. Continuation lines can still contain an expiration value, indicating that the next line is a further continuation. Link Lines A link line causes the creation of an alternate filename for timezone-name. Files are created with both of the specified names, permitting both names to reference the time-zone information compiled for timezone-name. A link line has this form: Link timezone-name alternate-name Here is an example: Link US/Eastern EST5EDT You can use any of the following replacement values in the fields following Link: timezone-name Must match timezone-name, as specified in a zone specification. (See ``Zone Lines'' earlier in the ``Description'' section.) alternate-name An alternate name for the name preceding it. Leap Lines Leap lines establish the times at which a second is either lost or gained. Leap lines have the following form: Leap year month day hh:mm:ss polarity gmt-local Here is an example: Leap 1974 Dex 31 23:59 + S The year, month, day, and hh:mm:ss fields specify when the leap second occurs. The value of the polarity field should be a plus sign (+) if a second must be added or a minus sign (-) if a second must be skipped. The value of the gmt-local January 1992 7
tzic(1M) tzic(1M)field should be Stationary if the time given by the other fields should be interpreted as GMT, or Rolling if the time given by the other fields should be interpreted as local time. Abbreviations of these keywords are also permitted. NOTES For areas with more than two types of local time, you may need to use local standard time in the begin-time field of the earliest transition time's rule to ensure that the earliest transition time recorded in the compiled file is correct. FILES /etc/tzic Executable file /etc/zoneinfo Standard directory used for newly created files SEE ALSO settimezone(1M), tzdump(1M) time(2), ctime(3), tzfile(4) in A/UX Programmer's Reference. 8 January 1992