-
Notifications
You must be signed in to change notification settings - Fork 4
/
832.txt
323 lines (230 loc) · 15.4 KB
/
832.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
[1] [[標準時]]や[[時間帯]]、[[時差]]を表現するには、様々な方法があります。
* 一般的な呼称
[2] 文脈により明らかな場合、「[[標準時]]」や「[[夏時刻]]」やそれらのバリエーションや、
「[[現地時間]]」のような語で表すことがあります。
;; 各項を参照。
* 法令上の呼称
[3] [[法定時刻]]の呼称は、
「[[標準時]]」のような一般的な語しか定められていないケースも多いですが、
「[VAR[地域名]][[標準時]]」のように[[地名]]で修飾された語が定義されている場合もあります。
;; 具体例は[[法定時刻]]および各地の[[標準時]]の項を参照。
[4] [[夏時刻]]を用いる場合、ほとんどは冬季の[[時刻]]を[[標準時]]と呼び、
それよりも進んだ夏季の[[時刻]]を[[夏時刻]]と呼びます。
[100] [[アイルランド]]の[[法令]]では、夏季の[[時刻]]が[[標準時]]とされており、
それより1時間遅い冬季の[[時刻]]が[[冬時刻]]とされています。
[99] [[ナウル]]では、[[法令]]で[[ナウル標準時]]という呼称で定義された[[時刻]]は使用されず、
[[ナウル代替時]]と呼ばれる[[時刻]]が[[標準時]]として使われています。
[5] ほとんどの場合、こうした[[時刻]]の名称は、
[[標準時]]の改正があると新しい[[時刻]]に付け替えられます。
つまり、ある名称が指す[[時刻]]が、改正の瞬間に切り替わります。
[6] 一方[[夏時刻]]を実施する場合、[[夏時刻]]は[[標準時]]の改正とはみなさず、
並行する異なる[[時刻]]として扱うことが多いようです。
* 時差表記
[35] [[時差]]は、2つの[[時刻]]の[[差]]によって表現されます。
ある時刻系が他の時刻系よりも早くある時刻値に到達するなら、
そちらの時刻系が「進んでいる」、他方の時刻系が「遅れている」といいます。
[172] 一般人向けの場合、例えば旅行ガイド等では、本国の時刻を基準とし、
それとの[[時差]]により、他の地域の[[標準時]]や[[夏時刻]]を説明するのが普通です。
[EG[
[173] 例えば、[[日本]]では、[[日本]]の時刻を基準に、[[台湾]]は1時間遅れているなどといいます。
]EG]
[174] 学術的な場面や多数の時刻を扱う場合などは、[[世界時]]を基準にすることが多いです。
[175] 進んでいることを [CODE[+]]、遅れていることを [CODE[-]] と表記し、
[[時差]]の[[時]]と[[分]] (と場合によっては[[秒]]) を表記して[[時差]]を記述することがよくあります。
[EG[
[176] [[日本の標準時]]は [[UTC]] より9時間早いので [TZ[+09:00]] と表し、
[[印度の標準時]]は [[UTC]] より5時間半早いので [TZ[+05:30]] と表します。
[[ハワイ]]の[[標準時]]は [[UTC]] より10時間遅いので [TZ[-10:00]] と表します。
]EG]
[177] ただし、[[符号]]は逆にすることもままありますから、注意が必要です。
;; [8] [[時差の表]]を見ると、歴史的にも[[符号]]の表現が2種類あり、
どちらが正しい、どちらが優勢とも言い難いことがわかります。
[76] (主に[[自然言語]]文で) 「GMT-9」、「UTC+9」、「JST+1」
のような慣用的な表記が用いられることがあります。
基準となる[[時間帯]]と、そこからの[[時差]]を表しています。[[符号]]の意味は文脈により逆転するので注意が必要です。
[17] [[差]]の値は、[[時]]、[[分]]、[[秒]]の組で表現することが多いですが、
[[時]]を単位とする[[小数]]で表すこともあります。
[EG[
[19] 例えば [TZ[+08:30]] は、 [N[+8.5]] とも表せます。
]EG]
[9] [[JavaScript]] の [CODE[getTimezoneOffset]] は、
[[UTC]] との[[時差]]を[[分]]単位の[[数値]]として返します。
[[UTC]] よりも進んでいることを[[負]]で表しています。
[36]
[[timestamp (Amazon Ion)]] のバイナリー形式は、[[分]]単位の整数で表します。
[20] 現在の[[近代的標準時制度]]でカバーされる[[時刻]]のみ扱う場合には、
[[UTC]] と[[整数]][[時]]単位の[[時差]]の他に、 15分、30分、45分の[[時差]]も扱える必要があります。
歴史的な[[時差]]や、[[船内時]]その他の分野依存の[[時刻]]を想定するなら、
任意の[[秒]] (求める[[精度]]次第では[[秒の小数部]]) まで扱える形で[[時差]]を記述できる必要があります。
[21] [[UTC]] との[[時差]]をどこまで認めるかは、記述形式によって違います。
現在の[[標準時制度][近代的標準時制度]]で現に用いられている[[時刻]]を扱うには、
[TZ[+14:00]] - [TZ[-12:00]] の範囲を扱える必要があります。
これで十分かどうかは、はっきりしません。
[22] [[ISO 9660の日時形式]]は [TZ[-12:00]] から [TZ[+13:00]] まで15分単位で指定できます。
-*-*-
[15] [[差]]として表現する方法以外に、ある地点の[[正午]]や[[正子]]の他の地点の[[時刻]]を表示する方式があります。
[[UTC]] の[[正午]]を基準にすると世界各地の[[時刻]]のほとんどが同じ1日の[[時刻]]として表せ、
わかりやすいというメリットがあります。
;; [16] 一方[[差]]としての表現は、[[負]]で端数がある時に少し計算がややこしくなるというデメリットがあります。
[FIG(short list)[ [194] [[時差]]の記述形式
- [[HTMLの時間帯表記]]
- [[インターネットメールの時間帯表記]]
- [[RFC 3339の日付形式]]のもの
- [[W3C-DTF]]のもの
- [[ISO 8601の日時形式]]のもの
- [CODE(XML)@en[[[xs:dateTime]]]] のもの
- [[環境変数[CODE[TZ]]]] ([[POSIX時間帯]])
- [CODE[SYS$TIMEZONE_DIFFERENTIAL]]
- [[MySQLの時間帯文字列]]
- [[XMPの日時形式]]
- [CODE[iodef:TimezoneType]]
- [[Sieveの日時形式]]
- [CODE[<time-offset>]]
- [CODE[<Operation>]] のもの
- [[timestamp (Amazon Ion)]]
- [CODE[urn:oasis:names:tc:xacml:3.0:entity:time‑zone]]
]FIG]
* 名前識別子表記
@@ 長い名前
@@ 略号
[89] [[CLDR]] には[[時間帯]]の名前の[[翻訳]]データが含まれています。
[[CLDR]] は地域名などを使った時刻の名称を定めると共に、
[[tzdata]] の[[時間帯]]履歴のうちのある期間の時刻がどの名称に相当するかの対応付けを持っています。
[10] 名前による表記は、多くの場合、[[時間帯]]を表しています。
ただしその「[[時間帯]]」は、ある時点のものだったり、歴史的変遷を含むものだったりします。
[FIG(short list)[
- [[tzdata]] の識別子
- [[Windows時間帯]]
- [[インターネットメールの時間帯表記]]
- [[米軍時間帯]]
- [CODE[[[Z]]]]
- [[Rails時間帯]]
- [CODE[u-tz]]
- [CODE[QTIMZON]]
- [CODE[:TimeZone]]
]FIG]
[34]
[[Compact Time Format]]
は[[緯度経度]]による指定方法を定義しています。
その地点の[[時間帯]]を参照しています。
([[経度]]が直ちに[[時差]]を表すものではないようです。)
[SEE[ 地名による表示 (人間向け) については[[日時の暦法明記]] ]]
[REFS[
- [88] [CITE[Time Zones - CLDR - Unicode Common Locale Data Repository]] ([TIME[2016-06-24 13:52:06 +09:00]]) <http://cldr.unicode.org/translation/timezones>
- [214] [CITE@en[List of time zone abbreviations - Wikipedia, the free encyclopedia]]
( ([TIME[2016-06-14 16:19:41 +09:00]]))
<https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations>
- [227] [CITE@en[Time Zone Abbreviations - Worldwide List]] ([TIME[2017-10-27 16:51:12 +09:00]]) <https://www.timeanddate.com/time/zones/>
]REFS]
[30] [CITE@en[TimeZone (Java SE 11 & JDK 11 )]] ([TIME[2019-06-06 09:27:08 +09:00]]) <https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/TimeZone.html#getDisplayName(boolean,int,java.util.Locale)>
* 不明の明記
[18] [[時間帯]]不明を表す表記があることもあります。
[[時間帯のない日時]]として暗黙的に表されることもあります。
[SEE[ [[時間帯のない日時]] ]]
* プロトコル
[113] 各種[[日時形式]]における[[時間帯]]の扱いや、
[[計算機]]における[[日時]]の表現での[[時間帯]]の取り扱いについては、
[[日時形式]]を参照。
[75] 各[[時間帯]]表記が使われる場所は、それぞれの項と次の各項を参照。
[FIG(short list)[
- [[XDMにおける時間帯]]
]FIG]
[29] [[時間帯]]自体を特に扱う[[プロトコル]]や[[言語]]もあります。
[FIG(short list)[
- [[TZDIST]]
- [[VTIMEZONE]]
- [[時間帯パターン]]
]FIG]
[195] [[アプリケーション]]の用いる[[時間帯]]について、「プラットフォームと同じ」
と指定する方法が提供されている場合があります。
;; [[システム時間帯]]参照。
[26] [[struct timezone]]
* セキュリティー、プライバシー
[14] [[時差の記述]]は、ときに [[fingerprinting vector]] となります。
[SEE[ [[日時のセキュリティー]]、[[日時のプライバシー]] ]]
* その他
[23] [[TIME IND]]
* 関連
[SEE[ [[日時の暦法明記]] ]]
* メモ
[13] [[RFC 2822]], [[son-of-RFC 1036]], [[usefor]] では数値形式を推奨。
[[HTTP]]では文字列「GMT」固定。
非標準の時間帯文字列を使う実装がかなりあった。今は少ないと思う。
各地で観測されている[[時間帯を表す文字列]]の一覧参照。
数値形式に、注釈で文字列を添える (eg. +0900 (JST)) のが、 [[RFC 2822]]の
[[[CODE(822)@en[Received]]:]] 欄における推奨。だけど、そういうのを
[[[CODE(822)@en[Date]]:]] 欄でやると意味の分からない足し算・引き算を
やる訳の分からん実装 ([[Windows 95]] の [[Microsoft Exchange]] らしい。)
があるという罠。
「-0000」は時間帯不明を表すという慣習があって、[[RFC 2822の日付形式]]
で明文化された。 UTC との時差が整数分にならない時もこれを
使うといいらしい。(ほんとか? ; この話はどの仕様書にも
載ってない。; ていうか整数分にならない地域ってどこよ?)
[[RFC 3339]] にこの話も載ってます。時差が整数分にならないのは、
過去にあったけど現在はないようです。 [[RFC 3339]] は、そうした
時間帯は他の適当な(表現可能な)時間帯に直すように指示しています。
("-00:00" にしろとまでは言ってない。)
- [25] 過去の[[リベリア]]では -00:44:30 を使っていたらしいです。
-*-*-
[28] [[日時]]の記述に含まれる[[時間帯]]の情報は、 [[UTC]] との関係を通じて実際の[[時刻]]を特定するだけでなく、
その[[時間帯]]自体の情報を伝えるためにも使えます。
[[RFC 3339]] は、[[電子メール]]の[[日時]]の[[時差]]から、
返事がすぐに返ってくるか推測できる [SRC[>>27]] と例示しています
([[時差]]から昼間の時間帯がいつからいつまでかを推察できるという意味でしょう)。
[82] しかし [[HTTPの日時形式]]のように、 [[UTC]] に固定して、
送信者の[[時間帯]]の情報を[[日時]]に含めていないものもあります。
[[HTTP]] では相手の[[時間帯]]が処理に影響しませんし、[[利用者]]に表示することもないので不要なのです。
[83] [[電子メール]]であっても、[[日時]]は[[受信者]]の[[プラットフォーム]]の[[時間帯]]の設定に合わせて表示し、
記述された[[時差]]の情報は使わない [[MUA]] が少なくありません。
あまり信用できる情報ではなく、[[利用者]]からは重視されていないということでしょう。
[REFS[
- [27] [CITE@en[RFC 3339 - Date and Time on the Internet: Timestamps]] ([TIME[2017-05-07 16:17:18 +09:00]]) <https://tools.ietf.org/html/rfc3339#section-4>
]REFS]
[FIG(quote)[
[FIGCAPTION[
[7] [CITE[タイムゾーン呪いの書 - Qiita]]
([TIME[2018-02-06 15:17:04 +09:00]])
<https://qiita.com/dmikurube/items/15899ec9de643e91497c>
]FIGCAPTION]
> JSR 310 の前身である Joda-Time では少し事情が異なります。org.joda.time.DateTimeUtils#getDefaultTimeZoneNames は、例えば "PST", "PDT" をともに "America/Los_Angeles" に対応させます。どうやら org.joda.time.format.DateTimeFormat.forPattern では間接的にこの getDefaultTimeZoneNames が使われているようで23、このため Ruby の Time.strptime や RFC とは異なり "2017-07-01 12:34:56 PST" は "2017-07-01 12:34:56 -07:00" として解釈されます。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[11] [CITE@en[Strava Developers]]
([TIME[2018-03-17 12:36:57 +09:00]])
<https://developers.strava.com/docs/reference/>
]FIGCAPTION]
> "timezone" : "(GMT-08:00) America/Los_Angeles",
> "utc_offset" : -28800,
]FIG]
[FIG(quote)[
[FIGCAPTION[
[12] [CITE@en[Strava Developers]]
([TIME[2018-03-17 12:36:57 +09:00]])
<https://developers.strava.com/docs/reference/>
]FIGCAPTION]
> "timezone" : "(GMT-08:00) America/Los_Angeles",
> "utc_offset" : -28800,
]FIG]
[24] [CITE[25.4.1. Time Functions]]
([TIME[2019-04-25 11:08:19 +09:00]])
<http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node232.html#29143>
[31] [CITE['''['''tz''']''' Java & Rearguard]]
([TIME[2019-06-09 03:06:05 +09:00]])
<https://mm.icann.org/pipermail/tz/2019-June/028122.html>
[FIG(quote)[
[FIGCAPTION[
[32] [CITE@ja[世界初のGPS ソーラーウオッチ<セイコー アストロン>より、ロサンゼルス・エンゼルス 大谷翔平選手をイメージしたコラボレーション限定モデル第二弾を発売:時事ドットコム]]
([TIME[2019-10-16 08:58:26 +09:00]])
<https://www.jiji.com/jc/article?k=000000226.000010826&g=prt>
]FIGCAPTION]
> 大谷翔平選手が所属するロサンゼルス・エンゼルスのチームカラーである「レッド」がアクセントカラーとしてさりげなく輝くスタイリッシュなデザインです。セイコー独自の表面硬化処理「スーパー ブラックダイヤシールド(※3)」を施した漆黒のベゼル上にレイアウトされる都市コードは、通常、「LAX」と表示される「UTC-8」のゾーンを、エンゼルスのホームタウンであるアナハイムを示す「ANA」の文字を特別に記し、アナハイムが属する「UTC-8」 の表示とともに赤色で強調し、限定モデルならではの特別なデザインに仕上げています。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[33] [CITE@ja[ジョンズ・ホプキンス健康安全保障センター、世界経済フォーラム、ビル&メリンダ・ゲイツ財団が広域流行病シミュレーション・ライブ配信を主催:時事ドットコム]]
([TIME[2019-10-21 09:38:47 +09:00]])
<https://www.jiji.com/jc/article?k=20191019005036&g=bw>
]FIGCAPTION]
> 一般市民は、東部標準時(夏時間)午前8時50分~午後0時30分に英語で実施される同時進行のバーチャル演習に、centerforhealthsecurity.org/event201/より登録・参加いただけます。
]FIG]