.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" References consulted:
.\" Linux libc source code
.\" Modified 2001-11-13, aeb
.\" Modified 2004-12-01 mtk and Martin Schulze <joey@infodrom.org>
.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
.\" Translated 1998-03-23, NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" Updated 2000-09-14, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2002-01-06, NAKANO Takeo
.\" Updated 2007-01-07, Akihiro MOTOKI, catch up to LDP v2.43
.\"
-.\" WORD: Wall Clock Time 壁時計時刻
-.\" WORD: Coordinated Universal Time 協定世界時
-.\" WORD: daylight saving time サマータイム
-.\" WORD: Prime Meridian グリニッジ子午線
-.\"
-.TH TZSET 3 2010-02-25 "" "Linux Programmer's Manual"
+.TH TZSET 3 2015\-01\-30 "" "Linux Programmer's Manual"
.SH 名前
tzset, tzname, timezone, daylight \- 時刻の変換情報を初期化する
.SH 書式
.nf
-.B #include <time.h>
+\fB#include <time.h>\fP
.sp
-.B void tzset (void);
+\fBvoid tzset (void);\fP
.sp
-.BI "extern char *" tzname [2];
-.BI "extern long " timezone ;
-.BI "extern int " daylight ;
+\fBextern char *\fP\fItzname\fP\fB[2];\fP
+\fBextern long \fP\fItimezone\fP\fB;\fP
+\fBextern int \fP\fIdaylight\fP\fB;\fP
.fi
.sp
.in -4n
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
.in
.sp
-.BR tzset ():
-_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
+\fBtzset\fP(): _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
.br
-.IR tzname :
-_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
+\fItzname\fP: _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
.br
-.IR timezone :
-_SVID_SOURCE || _XOPEN_SOURCE
+\fItimezone\fP: _SVID_SOURCE || _XOPEN_SOURCE
.br
-.IR daylight :
-_SVID_SOURCE || _XOPEN_SOURCE
+\fIdaylight\fP: _SVID_SOURCE || _XOPEN_SOURCE
.SH 説明
-.BR tzset ()
-関数は
-.B TZ
-環境変数を用いて \fItzname\fP 変数を初期化する。
-この関数は、タイムゾーンに依存する他の時刻変換関数から自動的に呼び出される。
-System V 的な環境では、この関数は変数 \fItimezone\fP (UTC からの西向きの秒数) と
-\fIdaylight\fP (このタイムゾーンにサマータイムに関するルールがなければ 0、
+\fBtzset\fP() 関数は \fBTZ\fP 環境変数を用いて \fItzname\fP 変数を初期化する。
+この関数は、タイムゾーンに依存する他の時刻変換関数から自動的に呼び出される。 System V 的な環境では、この関数は変数 \fItimezone\fP
+(UTC からの西向きの秒数) と \fIdaylight\fP (このタイムゾーンにサマータイムに関するルールがなければ 0、
サマータイム期間が一年のどこかにあれば 0 以外) も設定する。
.PP
-.B TZ
-環境変数が設定されていない場合には、
-\fItzname\fP 変数はローカルな壁時計時刻 (wall clock time) に
-最も近い値に初期化される。
-このローカルな壁時計時刻としては、
-システムのタイムゾーンディレクトリ (後述) にある
-.BR tzfile (5)
-形式のファイル \fIlocaltime\fP で指定されている値が用いられる。
-(この際には
-.I /etc/localtime
-もよく用いられる。
-これはシステムのタイムゾーンディレクトリにある
-適切なファイルへのシンボリックリンクになっている。)
+If the \fBTZ\fP variable does not appear in the environment, the system
+timezone is used. The system timezone is configured by copying, or linking,
+a file in the \fBtzfile\fP(5) format to \fI/etc/localtime\fP. A timezone database
+of these files may be located in the system timezone directory (see the
+\fBFILES\fP section below).
.PP
-.B TZ
-環境変数が存在しているが、その値が空だったり、
-以下に示す形式のどれにもあてはまらない場合は、
-協定世界時 (Coordinated Universal Time: UTC) が用いられる。
+\fBTZ\fP 環境変数が存在しているが、その値が空だったり、 以下に示す形式のどれにもあてはまらない場合は、 協定世界時 (Coordinated
+Universal Time: UTC) が用いられる。
.PP
-.B TZ
-の値は以下の 3 つの形式のいずれかを取ることができる。
-最初の形式はサマータイム (daylight saving time)
-を持たないローカルタイムゾーンに対して用いる。
+The value of \fBTZ\fP can be one of two formats. The first format is a string
+of characters that directly represent the timezone to be used:
.sp
.RS
-.I std offset
+std offset \fIdst\fP[\fIoffset\fP][,\fIstart\fP[\fI/time\fP],\fIend\fP[\fI/time\fP]]
.RE
.sp
-\fIstd\fP 文字列はタイムゾーンの名前を指定する。
-アルファベットからなる 3 文字以上の文字列でなければならない。
-\fIoffset\fP 文字列は \fIstd\fP の直後に続き、
-協定世界時 (UTC) を得るために
-ローカルな時刻に加えなければならない時間を指定する。
-.I offset
-は、ローカルタイムゾーンがグリニッジ子午線 (Prime Meridian)
-の西なら正の値、東なら負の値を取る。
-時間 (hour) は 0 から 24 の間でなければならない。
-分 (minute) と秒 (second) は 0 から 59 の間でなければならない。
+There are no spaces in the specification. The \fIstd\fP string specifies the
+name of the timezone and must be three or more alphabetic characters. The
+\fIoffset\fP string immediately follows \fIstd\fP and specifies the time value to
+be added to the local time to get Coordinated Universal Time (UTC). The
+\fIoffset\fP is positive if the local timezone is west of the Prime Meridian
+and negative if it is east. The hour must be between 0 and 24, and the
+minutes and seconds 0 and 59.
.PP
-2 番目の形式はサマータイムがある場合に用いられる。
-.sp
-.RS
-.I std offset dst [offset],start[/time],end[/time]
-.RE
-.sp
-指定にはスペースを含めてはならない。
-先頭の \fIstd\fP と \fIoffset\fP は 1 番目の形式と同じで、
-標準のタイムゾーンを指定する。
-\fIdst\fP 文字列と \fIoffset\fP は、
-対応するサマータイムゾーンの名前とオフセットを指定する。
-オフセットが省略されると、デフォルトでは標準の一時間前となる。
+The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
+corresponding daylight saving timezone. If the offset is omitted, it
+defaults to one hour ahead of standard time.
.PP
-\fIstart\fP フィールドはサマータイムが有効になる時刻、
-\fIend\fP フィールドは標準に戻る時刻である。
+\fIstart\fP フィールドはサマータイムが有効になる時刻、 \fIend\fP フィールドは標準に戻る時刻である。
これらのフィールドは以下の形式で指定する。
-.TP
+.TP
J\fIn\fP
年の通日 (Julian day) で日にちを指定する。
+\fIn\fP は 1 から 365 の間の数値。閏日は計算に入らない。
+この形式では、2 月 29 日を表現することはできず、
+2 月 28 日が第 59 日で、3 月 1 日が常に第 60 日となる。
+.TP
+\fIn\fP
+年の通日 (Julian day) で日にちを指定する。
\fIn\fP は 1 から 365 の間の数値。
-うるう年の場合でも 2 月 29 日はカウントされない。
-.TP
-.I n
-年の通日で日にちを指定する。
-\fIn\fP は 1 から 365 の間の数値。
-うるう年の場合には 2 月 29 日がカウントされる。
-.TP
+閏年の場合も、2 月 29 日も日にちの計算に含められる。
+.TP
M\fIm\fP.\fIw\fP.\fId\fP
-\fIm\fP は月 (1 <= \fIm\fP <= 12) を、
-\fIw\fP は月のうちの週 (1 <= \fIw\fP <= 5) を、
-\fId\fP は週のうちの日にち (0 <= \fId\fP <= 6) を示す。
-\fIw\fP = 1 は所属する \fId\fP が存在する最初の週、
-\fIw\fP = 5 は最後の週である。
-\fId\fP = 0 は日曜日である。
+\fIm\fP は月 (1 <= \fIm\fP <= 12) を、 \fIw\fP は月のうちの週 (1 <= \fIw\fP <= 5)
+を、 \fId\fP は週のうちの日にち (0 <= \fId\fP <= 6) を示す。 \fIw\fP = 1 は所属する \fId\fP
+が存在する最初の週、 \fIw\fP = 5 は最後の週である。 \fId\fP = 0 は日曜日である。
.PP
-\fItime\fP フィールドは、ローカルタイムを切り替える時刻を、
-変更前のローカルタイムで表したものである。
-省略された場合のデフォルトは 02:00:00 である。
+\fItime\fP フィールドは、ローカルタイムを切り替える時刻を、 変更前のローカルタイムで表したものである。 省略された場合のデフォルトは
+02:00:00 である。
-ニュージーランドの例である。
-ニュージーランドでは、標準のタイムゾーン (NZST) は UTC より 12時間進んでおり、
-サマータイム (NZDT) は UTC の 13時間進んでいる。
-サマータイムは 10月の第一日曜から 3月の第三日曜までであり、
-ローカルタイムの切り替えはデフォルトの 02:00:00 に行われる。
+ニュージーランドの例である。 ニュージーランドでは、標準のタイムゾーン (NZST) は UTC より 12時間進んでおり、 サマータイム (NZDT)
+は UTC の 13時間進んでいる。 サマータイムは 10月の第一日曜から 3月の第三日曜までであり、 ローカルタイムの切り替えはデフォルトの
+02:00:00 に行われる。
.nf
- TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
+ TZ="NZST\-12:00:00NZDT\-13:00:00,M10.1.0,M3.3.0"
.fi
.PP
-3 番目の形式は、タイムゾーンの情報をファイルから読み込むように指定する。
+The second format specifies that the timezone information should be read
+from a file:
.sp
.RS
:[filespec]
.RE
.sp
-ファイルの指定 \fIfilespec\fP が省略された場合は、
-タイムゾーンの情報はシステムタイムゾーンディレクトリの
-.I localtime
-ファイルから読まれる。
-最近ではシステムタイムゾーンディレクトリは普通
-.I /usr/share/zoneinfo/localtime
-である。
-このファイルは
-.BR tzfile (5)
-形式で書かれている。
-\fIfilespec\fP が与えられた場合は、
-タイムゾーンの情報をそのファイルから読み込む。このファイルも
-.BR tzfile (5)
-形式で書かれている必要がある。
-\fIfilespec\fP が \(aq/\(aq で始まらなかった場合には、
-システムタイムゾーンディレクトリからの相対パスで
-ファイルが指定されたことになる。
+If the file specification \fIfilespec\fP is omitted, or its value cannot be
+interpreted, then Coordinated Universal Time (UTC) is used. If \fIfilespec\fP
+is given, it specifies another \fBtzfile\fP(5)\-format file to read the timezone
+information from. If \fIfilespec\fP does not begin with a \(aq/\(aq, the file
+specification is relative to the system timezone directory. If the colon is
+omitted each of the above \fBTZ\fP formats will be tried.
.PP
例を挙げておく。もう一度ニュージーランドの例である。
.nf
TZ=":Pacific/Auckland"
.fi
+.SH 環境変数
+.TP
+\fBTZ\fP
+If this variable is set its value takes precedence over the system
+configured timezone.
+.TP
+\fBTZDIR\fP
+If this variable is set its value takes precedence over the system
+configured timezone database directory path.
.SH ファイル
-用いられるシステムタイムゾーンディレクトリは (g)libc のバージョンに依存する。
-libc4 と libc5 は
-.I /usr/lib/zoneinfo
-を用いる。libc-5.4.6 以降では、これが使えなかった場合には
-.I /usr/share/zoneinfo
-を使おうとする。
-glibc2 では環境変数
-.B TZDIR
-が存在すればそれを用いる。
-このデフォルトはどのようにインストールされたかによるが、
-普通は
-.I /usr/share/zoneinfo
-である。
-.LP
-このタイムゾーンディレクトリには以下のファイルが含まれる。
-.sp
-.nf
-localtime ローカルタイムゾーンのファイル
-posixrules POSIX 式の TZ 書式ルール
-.fi
-.LP
-.I /etc/localtime
-は、
-.I localtime
-ファイルや、
-システムのタイムゾーンディレクトリ中の適切なタイムゾーンファイルへの
-シンボリックリンクであることが多い。
+.TP
+\fB/etc/localtime\fP
+システムのタイムゾーンファイル。
+.TP
+\fB/usr/share/zoneinfo/\fP
+The system timezone database directory.
+.TP
+\fB/usr/share/zoneinfo/posixrules\fP
+When a TZ string includes a dst timezone without anything following it, then
+this file is used for the start/end rules. It is in the \fBtzfile\fP(5)
+format. By default, the zoneinfo Makefile hard links it to the
+\fIAmerica/New_York\fP tzfile.
+.PP
+Above are the current standard file locations, but they are configurable
+when glibc is compiled.
.SH 準拠
-SVr4, POSIX.1-2001, 4.3BSD.
+SVr4, POSIX.1\-2001, 4.3BSD.
.SH 注意
-.I daylight
-変数は、現在がサマータイムであるかどうかを示しているのではない。
-これはいくつかあるアルゴリズムのうちの番号を与える
-(アルゴリズムについては
-.BR gettimeofday (2)
-の
-.I tz_dsttime
-変数を見よ)。
+\fIdaylight\fP 変数は、現在がサマータイムであるかどうかを示しているのではない。 これはいくつかあるアルゴリズムのうちの番号を与える
+(アルゴリズムについては \fBgettimeofday\fP(2) の \fItz_dsttime\fP 変数を見よ)。
これはもう何年も使われていないが、SUSv2 では必要とされている。
.LP
-4.3BSD には
-.BI "char *timezone(" zone ", " dst )
-というルーチンがあり、これは
-最初の引数 (UTC からの西向きの分数) に対応するタイムゾーンの名前を返す。
-二番目の引数が 0 の場合は標準の名前が用いられ、
+4.3BSD には \fBchar *timezone(\fP\fIzone\fP\fB, \fP\fIdst\fP\fB)\fP というルーチンがあり、これは 最初の引数 (UTC
+からの西向きの分数) に対応するタイムゾーンの名前を返す。 二番目の引数が 0 の場合は標準の名前が用いられ、
それ以外はサマータイム版の名前が用いられる。
.SH 関連項目
-.BR date (1),
-.BR gettimeofday (2),
-.BR time (2),
-.BR ctime (3),
-.BR getenv (3),
-.BR tzfile (5)
+\fBdate\fP(1), \fBgettimeofday\fP(2), \fBtime\fP(2), \fBctime\fP(3), \fBgetenv\fP(3),
+\fBtzfile\fP(5)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。