OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / draft / man3 / tzset.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sun Jul 25 11:01:58 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2001-11-13, aeb
29 .\" Modified 2004-12-01 mtk and Martin Schulze <joey@infodrom.org>
30 .\"
31 .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
32 .\" Translated 1998-03-23, NAKANO Takeo <nakano@apm.seikei.ac.jp>
33 .\" Updated 2000-09-14, Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated 2002-01-06, NAKANO Takeo
35 .\" Updated 2007-01-07, Akihiro MOTOKI, catch up to LDP v2.43
36 .\"
37 .\" WORD:       Wall Clock Time                 ÊÉ»þ·×»þ¹ï
38 .\" WORD:       Coordinated Universal Time      ¶¨ÄêÀ¤³¦»þ
39 .\" WORD:       daylight saving time            ¥µ¥Þ¡¼¥¿¥¤¥à
40 .\" WORD:       Prime Meridian                  ¥°¥ê¥Ë¥Ã¥¸»Ò¸áÀþ
41 .\"
42 .TH TZSET 3  2010-02-25 "" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .\"O tzset, tzname, timezone, daylight \- initialize time conversion information
45 .SH Ì¾Á°
46 tzset, tzname, timezone, daylight \- »þ¹ï¤ÎÊÑ´¹¾ðÊó¤ò½é´ü²½¤¹¤ë
47 .\"O .SH SYNOPSIS
48 .SH ½ñ¼°
49 .nf
50 .B #include <time.h>
51 .sp
52 .B void tzset (void);
53 .sp
54 .BI "extern char *" tzname [2];
55 .BI "extern long " timezone ;
56 .BI "extern int " daylight ;
57 .fi
58 .sp
59 .in -4n
60 .\"O Feature Test Macro Requirements for glibc (see
61 .\"O .BR feature_test_macros (7)):
62 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
63 .RB ( feature_test_macros (7)
64 »²¾È):
65 .in
66 .sp
67 .BR tzset ():
68 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
69 .br
70 .IR tzname :
71 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
72 .br
73 .IR timezone :
74 _SVID_SOURCE || _XOPEN_SOURCE
75 .br
76 .IR daylight :
77 _SVID_SOURCE || _XOPEN_SOURCE
78 .\"O .SH DESCRIPTION
79 .SH ÀâÌÀ
80 .\"O The
81 .\"O .BR tzset ()
82 .\"O function initializes the \fItzname\fP variable from the
83 .\"O .B TZ
84 .\"O environment variable.
85 .\"O This function is automatically called by the
86 .\"O other time conversion functions that depend on the timezone.
87 .\"O In a System-V-like environment, it will also set the variables \fItimezone\fP
88 .\"O (seconds West of UTC) and \fIdaylight\fP (to 0 if this timezone does not
89 .\"O have any daylight saving time rules, or to nonzero if there is a time during
90 .\"O the year when daylight saving time applies).
91 .BR tzset ()
92 ´Ø¿ô¤Ï
93 .B TZ
94 ´Ä¶­ÊÑ¿ô¤òÍѤ¤¤Æ \fItzname\fP ÊÑ¿ô¤ò½é´ü²½¤¹¤ë¡£
95 ¤³¤Î´Ø¿ô¤Ï¡¢¥¿¥¤¥à¥¾¡¼¥ó¤Ë°Í¸¤¹¤ë¾¤Î»þ¹ïÊÑ´¹´Ø¿ô¤«¤é¼«Æ°Åª¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
96 System V Åª¤Ê´Ä¶­¤Ç¤Ï¡¢¤³¤Î´Ø¿ô¤ÏÊÑ¿ô \fItimezone\fP (UTC ¤«¤é¤ÎÀ¾¸þ¤­¤ÎÉÿô) ¤È
97 \fIdaylight\fP (¤³¤Î¥¿¥¤¥à¥¾¡¼¥ó¤Ë¥µ¥Þ¡¼¥¿¥¤¥à¤Ë´Ø¤¹¤ë¥ë¡¼¥ë¤¬¤Ê¤±¤ì¤Ð 0¡¢
98 ¥µ¥Þ¡¼¥¿¥¤¥à´ü´Ö¤¬°ìǯ¤Î¤É¤³¤«¤Ë¤¢¤ì¤Ð 0 °Ê³°) ¤âÀßÄꤹ¤ë¡£
99 .PP
100 .\"O If the
101 .\"O .B TZ
102 .\"O variable does not appear in the environment, the \fItzname\fP
103 .\"O variable is initialized with the best approximation of local wall clock
104 .\"O time, as specified by the
105 .\"O .BR tzfile (5)-format
106 .\"O file \fIlocaltime\fP
107 .\"O found in the system timezone directory (see below).
108 .B TZ
109 ´Ä¶­ÊÑ¿ô¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢
110 \fItzname\fP ÊÑ¿ô¤Ï¥í¡¼¥«¥ë¤ÊÊÉ»þ·×»þ¹ï (wall clock time) ¤Ë
111 ºÇ¤â¶á¤¤Ãͤ˽é´ü²½¤µ¤ì¤ë¡£
112 ¤³¤Î¥í¡¼¥«¥ë¤ÊÊÉ»þ·×»þ¹ï¤È¤·¤Æ¤Ï¡¢
113 ¥·¥¹¥Æ¥à¤Î¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê (¸å½Ò) ¤Ë¤¢¤ë
114 .BR tzfile (5)
115 ·Á¼°¤Î¥Õ¥¡¥¤¥ë \fIlocaltime\fP ¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ëÃͤ¬ÍѤ¤¤é¤ì¤ë¡£
116 .\"O (One also often sees
117 .\"O .I /etc/localtime
118 .\"O used here, a symlink to the right file in the system timezone directory.)
119 (¤³¤ÎºÝ¤Ë¤Ï
120 .I /etc/localtime
121 ¤â¤è¤¯ÍѤ¤¤é¤ì¤ë¡£
122 ¤³¤ì¤Ï¥·¥¹¥Æ¥à¤Î¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë
123 ŬÀڤʥե¡¥¤¥ë¤Ø¤Î¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£)
124 .PP
125 .\"O If the
126 .\"O .B TZ
127 .\"O variable does appear in the environment but its value is empty
128 .\"O or its value cannot be interpreted using any of the formats specified
129 .\"O below, Coordinated Universal Time (UTC) is used.
130 .B TZ
131 ´Ä¶­ÊÑ¿ô¤¬Â¸ºß¤·¤Æ¤¤¤ë¤¬¡¢¤½¤ÎÃͤ¬¶õ¤À¤Ã¤¿¤ê¡¢
132 °Ê²¼¤Ë¼¨¤¹·Á¼°¤Î¤É¤ì¤Ë¤â¤¢¤Æ¤Ï¤Þ¤é¤Ê¤¤¾ì¹ç¤Ï¡¢
133 ¶¨ÄêÀ¤³¦»þ (Coordinated Universal Time: UTC) ¤¬ÍѤ¤¤é¤ì¤ë¡£
134 .PP
135 .\"O The value of
136 .\"O .B TZ
137 .\"O can be one of three formats.
138 .\"O The first format is used
139 .\"O when there is no daylight saving time in the local timezone:
140 .B TZ
141 ¤ÎÃͤϰʲ¼¤Î 3 ¤Ä¤Î·Á¼°¤Î¤¤¤º¤ì¤«¤ò¼è¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
142 ºÇ½é¤Î·Á¼°¤Ï¥µ¥Þ¡¼¥¿¥¤¥à (daylight saving time)
143 ¤ò»ý¤¿¤Ê¤¤¥í¡¼¥«¥ë¥¿¥¤¥à¥¾¡¼¥ó¤ËÂФ·¤ÆÍѤ¤¤ë¡£
144 .sp
145 .RS
146 .I std offset
147 .RE
148 .sp
149 .\"O The \fIstd\fP string specifies the name of the timezone and must be
150 .\"O three or more alphabetic characters.
151 .\"O The \fIoffset\fP string immediately
152 .\"O follows \fIstd\fP and specifies the time value to be added to the local
153 .\"O time to get Coordinated Universal Time (UTC).
154 .\"O The \fIoffset\fP is positive
155 .\"O if the local timezone is west of the Prime Meridian and negative if it is
156 .\"O east.
157 .\"O The hour must be between 0 and 24, and the minutes and seconds
158 .\"O 0 and 59.
159 \fIstd\fP Ê¸»úÎó¤Ï¥¿¥¤¥à¥¾¡¼¥ó¤Î̾Á°¤ò»ØÄꤹ¤ë¡£
160 ¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¤«¤é¤Ê¤ë 3 Ê¸»ú°Ê¾å¤Îʸ»úÎó¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
161 \fIoffset\fP Ê¸»úÎó¤Ï \fIstd\fP ¤Îľ¸å¤Ë³¤­¡¢
162 ¶¨ÄêÀ¤³¦»þ (UTC) ¤òÆÀ¤ë¤¿¤á¤Ë
163 ¥í¡¼¥«¥ë¤Ê»þ¹ï¤Ë²Ã¤¨¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤»þ´Ö¤ò»ØÄꤹ¤ë¡£
164 .I offset
165 ¤Ï¡¢¥í¡¼¥«¥ë¥¿¥¤¥à¥¾¡¼¥ó¤¬¥°¥ê¥Ë¥Ã¥¸»Ò¸áÀþ (Prime Meridian)
166 ¤ÎÀ¾¤Ê¤éÀµ¤ÎÃÍ¡¢Åì¤Ê¤éÉé¤ÎÃͤò¼è¤ë¡£
167 »þ´Ö (hour) ¤Ï 0 ¤«¤é 24 ¤Î´Ö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
168 ʬ (minute) ¤ÈÉà(second) ¤Ï 0 ¤«¤é 59 ¤Î´Ö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
169 .PP
170 .\"O The second format is used when there is daylight saving time:
171 2 ÈÖÌܤηÁ¼°¤Ï¥µ¥Þ¡¼¥¿¥¤¥à¤¬¤¢¤ë¾ì¹ç¤ËÍѤ¤¤é¤ì¤ë¡£
172 .sp
173 .RS
174 .I std offset dst [offset],start[/time],end[/time]
175 .RE
176 .sp
177 .\"O There are no spaces in the specification.
178 .\"O The initial \fIstd\fP and
179 .\"O \fIoffset\fP specify the standard timezone, as described above.
180 .\"O The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
181 .\"O corresponding daylight saving timezone.
182 .\"O If the offset is omitted,
183 .\"O it default to one hour ahead of standard time.
184 »ØÄê¤Ë¤Ï¥¹¥Ú¡¼¥¹¤ò´Þ¤á¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
185 ÀèƬ¤Î \fIstd\fP ¤È \fIoffset\fP ¤Ï 1 ÈÖÌܤηÁ¼°¤ÈƱ¤¸¤Ç¡¢
186 ɸ½à¤Î¥¿¥¤¥à¥¾¡¼¥ó¤ò»ØÄꤹ¤ë¡£
187 \fIdst\fP Ê¸»úÎó¤È \fIoffset\fP ¤Ï¡¢
188 Âбþ¤¹¤ë¥µ¥Þ¡¼¥¿¥¤¥à¥¾¡¼¥ó¤Î̾Á°¤È¥ª¥Õ¥»¥Ã¥È¤ò»ØÄꤹ¤ë¡£
189 ¥ª¥Õ¥»¥Ã¥È¤¬¾Êά¤µ¤ì¤ë¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ïɸ½à¤Î°ì»þ´ÖÁ°¤È¤Ê¤ë¡£
190 .PP
191 .\"O The \fIstart\fP field specifies when daylight saving time goes into
192 .\"O effect and the \fIend\fP field specifies when the change is made back to
193 .\"O standard time.
194 .\"O These fields may have the following formats:
195 \fIstart\fP ¥Õ¥£¡¼¥ë¥É¤Ï¥µ¥Þ¡¼¥¿¥¤¥à¤¬Í­¸ú¤Ë¤Ê¤ë»þ¹ï¡¢
196 \fIend\fP ¥Õ¥£¡¼¥ë¥É¤Ïɸ½à¤ËÌá¤ë»þ¹ï¤Ç¤¢¤ë¡£
197 ¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Ï°Ê²¼¤Î·Á¼°¤Ç»ØÄꤹ¤ë¡£
198 .TP
199 J\fIn\fP
200 .\"O This specifies the Julian day with \fIn\fP between 1 and 365.
201 .\"O February 29 is never counted even in leap years.
202 ǯ¤ÎÄÌÆü (Julian day) ¤ÇÆü¤Ë¤Á¤ò»ØÄꤹ¤ë¡£
203 \fIn\fP ¤Ï 1 ¤«¤é 365 ¤Î´Ö¤Î¿ôÃÍ¡£
204 ¤¦¤ë¤¦Ç¯¤Î¾ì¹ç¤Ç¤â 2 ·î 29 Æü¤Ï¥«¥¦¥ó¥È¤µ¤ì¤Ê¤¤¡£
205 .TP
206 .I n
207 .\"O This specifies the Julian day with \fIn\fP between 1 and 365.
208 .\"O February 29 is counted in leap years.
209 ǯ¤ÎÄÌÆü¤ÇÆü¤Ë¤Á¤ò»ØÄꤹ¤ë¡£
210 \fIn\fP ¤Ï 1 ¤«¤é 365 ¤Î´Ö¤Î¿ôÃÍ¡£
211 ¤¦¤ë¤¦Ç¯¤Î¾ì¹ç¤Ë¤Ï 2 ·î 29 Æü¤¬¥«¥¦¥ó¥È¤µ¤ì¤ë¡£
212 .TP
213 M\fIm\fP.\fIw\fP.\fId\fP
214 .\"O This specifies day \fId\fP (0 <= \fId\fP <= 6) of week \fIw\fP
215 .\"O (1 <= \fIw\fP <= 5) of month \fIm\fP (1 <= \fIm\fP <= 12).
216 .\"O Week 1 is
217 .\"O the first week in which day \fId\fP occurs and week 5 is the last week
218 .\"O in which day \fId\fP occurs.
219 .\"O Day 0 is a Sunday.
220 \fIm\fP ¤Ï·î (1 <= \fIm\fP <= 12) ¤ò¡¢
221 \fIw\fP ¤Ï·î¤Î¤¦¤Á¤Î½µ (1 <= \fIw\fP <= 5) ¤ò¡¢
222 \fId\fP ¤Ï½µ¤Î¤¦¤Á¤ÎÆü¤Ë¤Á (0 <= \fId\fP <= 6) ¤ò¼¨¤¹¡£
223 \fIw\fP = 1 ¤Ï½ê°¤¹¤ë \fId\fP ¤¬Â¸ºß¤¹¤ëºÇ½é¤Î½µ¡¢
224 \fIw\fP = 5 ¤ÏºÇ¸å¤Î½µ¤Ç¤¢¤ë¡£
225 \fId\fP = 0 ¤ÏÆüÍËÆü¤Ç¤¢¤ë¡£
226 .PP
227 .\"O The \fItime\fP fields specify when, in the local time currently in effect,
228 .\"O the change to the other time occurs.
229 .\"O If omitted, the default is 02:00:00.
230 \fItime\fP ¥Õ¥£¡¼¥ë¥É¤Ï¡¢¥í¡¼¥«¥ë¥¿¥¤¥à¤òÀÚ¤êÂؤ¨¤ë»þ¹ï¤ò¡¢
231 Êѹ¹Á°¤Î¥í¡¼¥«¥ë¥¿¥¤¥à¤Çɽ¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
232 ¾Êά¤µ¤ì¤¿¾ì¹ç¤Î¥Ç¥Õ¥©¥ë¥È¤Ï 02:00:00 ¤Ç¤¢¤ë¡£
233
234 .\"O Here is an example for New Zealand,
235 .\"O where the standard time (NZST) is 12 hours ahead of UTC,
236 .\"O and daylight saving time (NZDT), 13 hours ahead of UTC,
237 .\"O runs from the first Sunday in October to the third Sunday in March,
238 .\"O and the changeovers happen at the default time of 02:00:00:
239 ¥Ë¥å¡¼¥¸¡¼¥é¥ó¥É¤ÎÎã¤Ç¤¢¤ë¡£
240 ¥Ë¥å¡¼¥¸¡¼¥é¥ó¥É¤Ç¤Ï¡¢É¸½à¤Î¥¿¥¤¥à¥¾¡¼¥ó (NZST) ¤Ï UTC ¤è¤ê 12»þ´Ö¿Ê¤ó¤Ç¤ª¤ê¡¢
241 ¥µ¥Þ¡¼¥¿¥¤¥à (NZDT) ¤Ï UTC ¤Î 13»þ´Ö¿Ê¤ó¤Ç¤¤¤ë¡£
242 ¥µ¥Þ¡¼¥¿¥¤¥à¤Ï 10·î¤ÎÂè°ìÆüÍˤ«¤é 3·î¤ÎÂè»°ÆüÍˤޤǤǤ¢¤ê¡¢
243 ¥í¡¼¥«¥ë¥¿¥¤¥à¤ÎÀÚ¤êÂؤ¨¤Ï¥Ç¥Õ¥©¥ë¥È¤Î 02:00:00 ¤Ë¹Ô¤ï¤ì¤ë¡£
244 .nf
245
246     TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"
247 .fi
248 .PP
249 .\"O The third format specifies that the timezone information should be read
250 .\"O from a file:
251 3 ÈÖÌܤηÁ¼°¤Ï¡¢¥¿¥¤¥à¥¾¡¼¥ó¤Î¾ðÊó¤ò¥Õ¥¡¥¤¥ë¤«¤éÆɤ߹þ¤à¤è¤¦¤Ë»ØÄꤹ¤ë¡£
252 .sp
253 .RS
254 :[filespec]
255 .RE
256 .sp
257 .\"O If the file specification \fIfilespec\fP is omitted, the timezone
258 .\"O information is read from the file
259 .\"O .I localtime
260 .\"O in the system timezone directory, which nowadays usually is
261 .\"O .IR /usr/share/zoneinfo .
262 ¥Õ¥¡¥¤¥ë¤Î»ØÄê \fIfilespec\fP ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢
263 ¥¿¥¤¥à¥¾¡¼¥ó¤Î¾ðÊó¤Ï¥·¥¹¥Æ¥à¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤Î
264 .I localtime
265 ¥Õ¥¡¥¤¥ë¤«¤éÆɤޤì¤ë¡£
266 ºÇ¶á¤Ç¤Ï¥·¥¹¥Æ¥à¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤ÏÉáÄÌ
267 .I /usr/share/zoneinfo/localtime
268 ¤Ç¤¢¤ë¡£
269 .\"O This file is in
270 .\"O .BR tzfile (5)
271 .\"O format.
272 .\"O If \fIfilespec\fP is given, it specifies another
273 .\"O .BR tzfile (5)-format
274 .\"O file to read the timezone information from.
275 .\"O If \fIfilespec\fP does not begin with a \(aq/\(aq, the file specification is
276 .\"O relative to the system timezone directory.
277 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
278 .BR tzfile (5)
279 ·Á¼°¤Ç½ñ¤«¤ì¤Æ¤¤¤ë¡£
280 \fIfilespec\fP ¤¬Í¿¤¨¤é¤ì¤¿¾ì¹ç¤Ï¡¢
281 ¥¿¥¤¥à¥¾¡¼¥ó¤Î¾ðÊó¤ò¤½¤Î¥Õ¥¡¥¤¥ë¤«¤éÆɤ߹þ¤à¡£¤³¤Î¥Õ¥¡¥¤¥ë¤â
282 .BR tzfile (5)
283 ·Á¼°¤Ç½ñ¤«¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
284 \fIfilespec\fP ¤¬ \(aq/\(aq ¤Ç»Ï¤Þ¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
285 ¥·¥¹¥Æ¥à¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹¤Ç
286 ¥Õ¥¡¥¤¥ë¤¬»ØÄꤵ¤ì¤¿¤³¤È¤Ë¤Ê¤ë¡£
287 .PP
288 .\"O Here's an example, once more for New Zealand:
289 Îã¤òµó¤²¤Æ¤ª¤¯¡£¤â¤¦°ìÅ٥˥塼¥¸¡¼¥é¥ó¥É¤ÎÎã¤Ç¤¢¤ë¡£
290 .nf
291
292     TZ=":Pacific/Auckland"
293 .fi
294 .\"O .SH FILES
295 .SH ¥Õ¥¡¥¤¥ë
296 .\"O The system timezone directory used depends on the (g)libc version.
297 ÍѤ¤¤é¤ì¤ë¥·¥¹¥Æ¥à¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤Ï (g)libc ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë°Í¸¤¹¤ë¡£
298 .\"O Libc4 and libc5 use
299 .\"O .IR /usr/lib/zoneinfo ,
300 .\"O and, since libc-5.4.6,
301 .\"O when this doesn't work, will try
302 .\"O .IR /usr/share/zoneinfo .
303 libc4 ¤È libc5 ¤Ï
304 .I /usr/lib/zoneinfo
305 ¤òÍѤ¤¤ë¡£libc-5.4.6 °Ê¹ß¤Ç¤Ï¡¢¤³¤ì¤¬»È¤¨¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï
306 .I /usr/share/zoneinfo
307 ¤ò»È¤ª¤¦¤È¤¹¤ë¡£
308 .\"O Glibc2 will use the environment variable
309 .\"O .BR TZDIR ,
310 .\"O when that exists.
311 glibc2 ¤Ç¤Ï´Ä¶­ÊÑ¿ô
312 .B TZDIR
313 ¤¬Â¸ºß¤¹¤ì¤Ð¤½¤ì¤òÍѤ¤¤ë¡£
314 .\"O Its default depends on how it was installed, but normally is
315 .\"O .IR /usr/share/zoneinfo .
316 ¤³¤Î¥Ç¥Õ¥©¥ë¥È¤Ï¤É¤Î¤è¤¦¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¤«¤Ë¤è¤ë¤¬¡¢
317 ÉáÄ̤Ï
318 .I /usr/share/zoneinfo
319 ¤Ç¤¢¤ë¡£
320 .LP
321 .\"O This timezone directory contains the files
322 ¤³¤Î¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ï°Ê²¼¤Î¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤ë¡£
323 .sp
324 .nf
325 .\"O localtime      local timezone file
326 .\"O posixrules     rules for POSIX-style TZ's
327 localtime      ¥í¡¼¥«¥ë¥¿¥¤¥à¥¾¡¼¥ó¤Î¥Õ¥¡¥¤¥ë
328 posixrules     POSIX ¼°¤Î TZ ½ñ¼°¥ë¡¼¥ë
329 .fi
330 .LP
331 .\"O Often
332 .\"O .I /etc/localtime
333 .\"O is a symlink to the file
334 .\"O .I localtime
335 .\"O or to the correct timezone file in the system timezone directory.
336 .I /etc/localtime
337 ¤Ï¡¢
338 .I localtime
339 ¥Õ¥¡¥¤¥ë¤ä¡¢
340 ¥·¥¹¥Æ¥à¤Î¥¿¥¤¥à¥¾¡¼¥ó¥Ç¥£¥ì¥¯¥È¥êÃæ¤ÎŬÀڤʥ¿¥¤¥à¥¾¡¼¥ó¥Õ¥¡¥¤¥ë¤Ø¤Î
341 ¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¢¤ë¤³¤È¤¬Â¿¤¤¡£
342 .\"O .SH "CONFORMING TO"
343 .SH ½àµò
344 SVr4, POSIX.1-2001, 4.3BSD.
345 .\"O .SH NOTES
346 .SH Ãí°Õ
347 .\"O Note that the variable \fIdaylight\fP does not indicate that daylight
348 .\"O saving time applies right now.
349 .\"O It used to give the number of some
350 .\"O algorithm (see the variable \fItz_dsttime\fP in
351 .\"O .BR gettimeofday (2)).
352 .\"O It has been obsolete for many years but is required by SUSv2.
353 .I daylight
354 ÊÑ¿ô¤Ï¡¢¸½ºß¤¬¥µ¥Þ¡¼¥¿¥¤¥à¤Ç¤¢¤ë¤«¤É¤¦¤«¤ò¼¨¤·¤Æ¤¤¤ë¤Î¤Ç¤Ï¤Ê¤¤¡£
355 ¤³¤ì¤Ï¤¤¤¯¤Ä¤«¤¢¤ë¥¢¥ë¥´¥ê¥º¥à¤Î¤¦¤Á¤ÎÈÖ¹æ¤òÍ¿¤¨¤ë
356 (¥¢¥ë¥´¥ê¥º¥à¤Ë¤Ä¤¤¤Æ¤Ï
357 .BR gettimeofday (2)
358 ¤Î
359 .I tz_dsttime
360 ÊÑ¿ô¤ò¸«¤è)¡£
361 ¤³¤ì¤Ï¤â¤¦²¿Ç¯¤â»È¤ï¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢SUSv2 ¤Ç¤ÏɬÍפȤµ¤ì¤Æ¤¤¤ë¡£
362 .LP
363 .\"O 4.3BSD had a function
364 .\"O .BI "char *timezone(" zone ", " dst )
365 .\"O that returned the
366 .\"O name of the timezone corresponding to its first argument (minutes
367 .\"O West of UTC).
368 .\"O If the second argument was 0, the standard name was used,
369 .\"O otherwise the daylight saving time version.
370 4.3BSD ¤Ë¤Ï
371 .BI "char *timezone(" zone ", " dst )
372 ¤È¤¤¤¦¥ë¡¼¥Á¥ó¤¬¤¢¤ê¡¢¤³¤ì¤Ï
373 ºÇ½é¤Î°ú¿ô (UTC ¤«¤é¤ÎÀ¾¸þ¤­¤Îʬ¿ô) ¤ËÂбþ¤¹¤ë¥¿¥¤¥à¥¾¡¼¥ó¤Î̾Á°¤òÊÖ¤¹¡£
374 ÆóÈÖÌܤΰú¿ô¤¬ 0 ¤Î¾ì¹ç¤Ïɸ½à¤Î̾Á°¤¬ÍѤ¤¤é¤ì¡¢
375 ¤½¤ì°Ê³°¤Ï¥µ¥Þ¡¼¥¿¥¤¥àÈǤÎ̾Á°¤¬ÍѤ¤¤é¤ì¤ë¡£
376 .\"O .SH "SEE ALSO"
377 .SH ´ØÏ¢¹àÌÜ
378 .BR date (1),
379 .BR gettimeofday (2),
380 .BR time (2),
381 .BR ctime (3),
382 .BR getenv (3),
383 .BR tzfile (5)