zic: usage is zic [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \ [ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ] Report bugs to tz@elsie.nci.nih.gov.
zic: usage is zic [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \ [ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ] Report bugs to tz@elsie.nci.nih.gov.
ZIC(8) Linux System Administration ZIC(8) 名前 zic - タイムゾーンコンパイラ 書式 zic [ -v ] [ -d directory ] [ -l localtime ] [ -p posixrules ] [ -L leapsecondfilename ] [ -s ] [ -y command ] [ filename ... ] 説明 zic はコマンドラインで指定されたファイル (複数指定可) からテキストを 読 み 、時刻変換情報ファイルを生成する。ファイル名も読み込みテキストで指定 しておく。 filename が - の場合は、標準入力から読み込む。 以下のオプションを指定できる: -d directory 時刻変換情報ファイルを生成するディレクトリを、標準のディレクトリ (以下を参照) ではなく指定したディレクトリにする。 -l timezone 指 定したタイムゾーンをローカルタイムに用いる。 zic は入力に以下 の書式のリンク行が含まれているかのように振る舞う。 Link timezone localtime -p timezone POSIX 形式のタイムゾーン環境変数を扱うとき、指定したタイムゾーン の ルールを用いる。 zic は入力に以下の書式のリンク行が含まれてい るかのように振る舞う。 Link timezone posixrules -L leapsecondfilename 閏秒情報を与えられた名前のファイルから読み込む。このオプションが 指定されなかった場合には、出力ファイルには閏秒の情報は含まれない 。 -v データファイルに現れる年が time(2) で表記できる範囲を越えてい る 場合に文句を言う。 -s 出 力 フ ァ イ ル に 格納される時刻の値を、 signed で評価しても unsigned で評価しても同じ値になるような範囲に制限する。このオ プ ションを使うと SVVS 互換なファイルを生成することができる。 -y command 年 の型のチェック (以下参照) に yearistype ではなく指定した com- mand を用いる。 入力行はフィールドからなる。フィールド間は、連続した任意の個数の空白 文 字 によって区切られる。行頭・行末の空白文字は無視される。クォートされて いないシャープ文字 (#) が入力行に現れた場合は、そこから行末まではコメン トとして扱われる。空白文字やシャープ文字をダブルクォート (") で囲めば、 フィールドの一部として用いることができる。 (コメント除去処理を行った 後 のものを含めて) 空行は無視される。空行以外の行は、 3 種類あるタイプの行 のいずれかであるとみなされる。 3 つのタイプとは、ルール行 (rule line)、 ゾーン行 (zone line)、リンク行 (link line) である。 ルール行の書式は以下のようなものである。 Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S 例: Rule US 1967 1973 - Apr lastSun 2:00 1:00 D ルール行を構成するフィールドは以下の通り: NAME このルールが所属するルールセットの名前を与える (任意)。 FROM このルールが適用される最初の年を与える。任意の整数を年として与 えることができる。グレゴリオ暦が仮定される。 minimum (あるい は そ の短縮) は整数表記できる最小の年を意味する。 maximum (あるい はその短縮) は整数表記できる最大の年を意味する。ルールでは時 刻 値 (time value) では表記できない時刻も記述できる。表記できない 時刻は無視される。つまりルールは異なった時刻値の型を持つホス ト 間でポータブルである。 TO このルールが適用される最後の年を与える。 minimum と maximum (上 述) に加え、 only (またはその短縮) を用いることができ、この場合 は FROM フィールドに指定した値と同じ値が用いられる。 TYPE ルールの適用される年のタイプを与える。 TYPE が - であれば、この ルールは FROM から TO に挟まれた (両端含む) 全ての年に適用さ れ る。 TYPE がそれ以外の場合には、 zic は以下のコマンドを実行して 年のタイプをチェックする。 yearistype year type 返り値が 0 の場合は、その年は与えられたタイプに含まれ、返り値が 1 の場合は含まれないことになる。 IN ルールが効力を持つ月の名前を指定する。月名は短縮できる。 ON ルールが効力を持つ日の名前を指定する。以下のような書式を認識す る: 5 その月の第 5 日 lastSun その月の最後の日曜日 lastMon その月の最後の月曜日 Sun>=8 第 8 日以降の最初の日曜日 Sun<=25 第 25 日以前の最後の日曜日 曜日の名前は短縮できる。全部綴っても良い。 ON フィールドの内 部 にはスペースを入れてはいけないことに注意。 AT ルールが効力を持つ一日のうちの時刻を与える。以下のような書式を 認識する: 2 時間での表記 2:00 時間と分での表記 15:00 24 時間形式の時間 (正午以降) 1:28:14 時間・分・秒での表記 - 0 と同じ ここで 0 時はその日のはじまりであり、 24 時はその日の終わりであ る 。これらの書式のあとには、以下の文字のいずれかを指定すること ができる。 w 与えられた時刻がローカルな "壁時計 (wall clock)" 時刻である; s 与えられた時刻がローカルな "標準 (standard)" 時刻 である; u (または g または z) 与えられた時刻が標準時 (universal time) である。これらの表意文字がいずれも指定されなかった場合は 、壁時計時刻が仮定される。 SAVE ルールが効力を持っているとき、ローカルな標準時刻に追加すべき 時 間 の量を与える。このフィールドの書式は AT フィールドのものと同 じである (ただしもちろん w と s の後置文字は用いられない)。 LETTER/S このルールが効力を持っている場合に用いられるタイムゾーン短縮 型 の "可変部 (variable part)" を与える (例えば "EST" や "EDT" に おける "S" や "D" など)。このフィールドが - であった場合には 、 可変部は存在しない。 ゾーン行の書式は以下のようなものである。 Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] 例: Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 ゾーン行を構成するフィールドは以下の通り: NAME タイムゾーンの名前。この名前がこのゾーンの時刻変換情報ファイルを 生成するときに用いられる。 GMTOFF このゾーンの標準時刻を得るために、 UTC に加える時間。このフィール ド の書式は、ルール行の AT および SAVE フィールドのものと同じであ る。時間を UTC から引く必要がある場合はマイナス記号を前置する。 RULES/SAVE タイムゾーンに適用されるルールの名前か、あるいはローカル標準時 刻 に加えるべき時間の量を指定する。このフィールドが - ならば、常に標 準時刻がこのゾーンに対して用いられる。 FORMAT このタイムゾーンに対するタイムゾーン短縮名の書式。 2 文字の文字列 %s を用いて、どこが "可変部" になるかを指定できる。あるいはスラッ シュ文字 (/) を用いて標準の短縮名とサマータイム短縮名を区切ること ができる。 UNTIL UTC に対するオフセットか、その場所におけるルールが変更される時刻 。年・月・日・時刻で指定する。これが指定された場合には、タイム ゾ ーンの情報は与えられている UTC オフセットから生成され、ルールは指 定時刻になると変更される。月・日・時刻は、ルールの IN, ON, AT カ ラ ムと同じ書式で指定する。この後に続くカラムは省略できる。省略さ れたカラムに対しては、可能性のあるもののうち最も早い値がデフォ ル トで用いられる。 こ の行には必ず "継続"(continuation) 行が続く。継続行はゾーン行と 同じ書式を持つが、 "Zone" と名前は省略される。なぜなら継続行は 直 前の行の UNTIL フィールドで指定された時刻以降の情報を与えるものだ からである。継続行にもゾーン行と同じように UNTIL フィールドを指定 す ることができ、この場合はその次の行がさらなる継続行になることと なる。 リンク行の書式は以下のようなものである。 Link LINK-FROM LINK-TO 例: Link Europe/Istanbul Asia/Istanbul LINK-FROM フィールドはゾーン行の NAME フィールドが記述される。 LINK-TO フィールドはそのゾーンの別名である。 ファイル中で閏秒を記述する行は以下のような書式を持つ。 Leap YEAR MONTH DAY HH:MM:SS CORR R/S 例: Leap 1974 Dec 31 23:59:60 + S YEAR, MONTH, DAY, HH:MM:SS は閏秒の生じた瞬間を示す。 CORR フィールドに は、秒が挿入された場合 "+" を、秒がスキップされた場合 "-" を指定する 。 R/S フィールドには、他のフィールドが記述している閏秒の時刻が UTC ならば "Stationary" (あるいはその短縮形) を、ローカ ル な 壁 時 計 時 刻 な ら "Rolling" (あるいはその短縮形) を指定する。 ファイル /usr/local/etc/zoneinfo 生成されたファイル用の標準ディレクト リ 注意 二つ以上のローカルタイムを持っている地域では、ローカルな標準時を最も 早 い 方の時刻変換ルールの AT フィールドに用いる必要があるだろう。さもない とコンパイルされたファイルに記録された最も早い変換時刻が正しいことが 保 証されない。 関連項目 tzfile(5), zdump(8) 2007-05-18 ZIC(8)
ZIC(8) Linux System Administration ZIC(8) NAME zic - timezone compiler SYNOPSIS zic [ -v ] [ -d directory ] [ -l localtime ] [ -p posixrules ] [ -L leapsecondfilename ] [ -s ] [ -y command ] [ filename ... ] DESCRIPTION Zic reads text from the file(s) named on the command line and creates the time conversion information files specified in this input. If a filename is -, the standard input is read. These options are available: -d directory Create time conversion information files in the named directory rather than in the standard directory named below. -l timezone Use the given timezone as local time. Zic will act as if the input contained a link line of the form Link timezone localtime -p timezone Use the given timezone’s rules when handling POSIX-format time- zone environment variables. Zic will act as if the input con- tained a link line of the form Link timezone posixrules -L leapsecondfilename Read leap second information from the file with the given name. If this option is not used, no leap second information appears in output files. -v Complain if a year that appears in a data file is outside the range of years representable by time(2) values. -s Limit time values stored in output files to values that are the same whether they’re taken to be signed or unsigned. You can use this option to generate SVVS-compatible files. -y command Use the given command rather than yearistype when checking year types (see below). Input lines are made up of fields. Fields are separated from one another by any number of white space characters. Leading and trailing white space on input lines is ignored. An unquoted sharp character (#) in the input introduces a comment which extends to the end of the line the sharp character appears on. White space characters and sharp char- acters may be enclosed in double quotes (") if they’re to be used 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. A rule line has the form Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S For example: Rule US 1967 1973 - Apr lastSun 2:00 1:00 D The fields that make up a rule line are: NAME Gives the (arbitrary) name of the set of rules this rule is part of. FROM Gives the first year in which the rule applies. Any integer year can be supplied; the Gregorian calendar is assumed. The word minimum (or an abbreviation) means the minimum year repre- sentable as an integer. The word maximum (or an abbreviation) means the maximum year representable as an integer. Rules can describe times that are not representable as time values, with the unrepresentable times ignored; this allows rules to be portable among hosts with differing time value types. TO Gives the final year in which the rule applies. In addition to minimum and maximum (as above), the word only (or an abbrevia- tion) may be used to repeat the value of the FROM field. TYPE Gives the type of year in which the rule applies. If TYPE is - then the rule applies in all years between FROM and TO inclu- sive. If TYPE is something else, then zic executes the command yearistype year type to check the type of a year: an exit status of zero is taken to mean that the year is of the given type; an exit status of one is taken to mean that the year is not of the given type. IN Names the month in which the rule takes effect. Month names may be abbreviated. ON Gives the day on which the rule takes effect. Recognized forms include: 5 the fifth of the month lastSun the last Sunday in the month lastMon the last Monday in the month Sun>=8 first Sunday on or after the eighth Sun<=25 last Sunday on or before the 25th Names of days of the week may be abbreviated or spelled out in full. Note that there must be no spaces within the ON field. AT Gives the time of day at which the rule takes effect. Recog- nized forms include: 2 time in hours 2:00 time in hours and minutes 15:00 24-hour format time (for times after noon) 1:28:14 time in hours, minutes, and seconds - equivalent to 0 where hour 0 is midnight at the start of the day, and hour 24 is midnight at the end of the day. Any of these forms may be followed by the letter w if the given time is local "wall clock" time, s if the given time is local "standard" time, or u (or g or z) if the given time is universal time; in the absence of an indicator, wall clock time is assumed. SAVE Gives the amount of time to be added to local standard time when the rule is in effect. This field has the same format as the AT field (although, of course, the w and s suffixes are not used). LETTER/S Gives the "variable part" (for example, the "S" or "D" in "EST" or "EDT") of timezone abbreviations to be used when this rule is in effect. If this field is -, the variable part is null. A zone line has the form Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] For example: Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 The fields that make up a zone line are: NAME The name of the timezone. This is the name used in creating the time conversion information file for the zone. GMTOFF The amount of time to add to UTC to get standard time in this zone. This field has the same format as the AT and SAVE fields of rule lines; begin the field with a minus sign if time must be subtracted from UTC. RULES/SAVE The name of the rule(s) that apply in the timezone or, alter- nately, an amount of time to add to local standard time. If this field is - then standard time always applies in the timezone. FORMAT The format for timezone abbreviations in this timezone. The pair of characters %s is used to show where the "variable part" of the timezone abbreviation goes. Alternately, a slash (/) separates standard and daylight abbreviations. UNTIL The time at which the UTC offset or the rule(s) change for a location. It is specified as a year, a month, a day, and a time of day. If this is specified, the timezone information is gener- ated from the given UTC offset and rule change until the time specified. The month, day, and time of day have the same format as the IN, ON, and AT columns of a rule; trailing columns can be omitted, and default to the earliest possible value for the miss- ing columns. The next line must be a "continuation" line; this has the same form as a zone line except that the string "Zone" and the name are omitted, as the continuation line will place information starting at the time specified as the UNTIL field in the previous line in the file used by the previous line. Continuation lines may contain an UNTIL field, just as zone lines do, indicating that the next line is a further continuation. A link line has the form Link LINK-FROM LINK-TO For example: Link Europe/Istanbul Asia/Istanbul The LINK-FROM field should appear as the NAME field in some zone line; the LINK-TO field is used as an alternate name for that zone. Except for continuation lines, lines may appear in any order in the input. Lines in the file that describes leap seconds have the following form: Leap YEAR MONTH DAY HH:MM:SS CORR R/S For example: Leap 1974 Dec 31 23:59:60 + S The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap second happened. The CORR field should be "+" if a second was added or "-" if a second was skipped. The R/S field should be (an abbreviation of) "Stationary" if the leap second time given by the other fields should be interpreted as UTC or (an abbreviation of) "Rolling" if the leap second time given by the other fields should be interpreted as local wall clock time. FILES /usr/local/etc/zoneinfo standard directory used for created files NOTES For areas with more than two types of local time, you may need to use local standard time in the AT field of the earliest transition time’s rule to ensure that the earliest transition time recorded in the com- piled file is correct. SEE ALSO tzfile(5), zdump(8) COLOPHON This page is part of release 3.22 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2007-05-18 ZIC(8)
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa