-
Notifications
You must be signed in to change notification settings - Fork 4
/
183.txt
667 lines (469 loc) · 25.2 KB
/
183.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
[23] [DFN[Unix time]] は、 [[Unix]] 系システムを中心に多くの[[計算機システム]]で用いられている[[日時]]の内部表現形式 ([[整数時刻系]]) です。
[[計算機システム]]用の[[時刻系]]としては最も著名なものです。
* 意味
[25] [[Unix time]] は、
[[元期]][TIME[1970年1月1日0時0分0秒 (UTC)][0]] ([DFN[Unix epoch]]、[DFN[The Epoch]])
から経過した[[秒]]単位の[[時間]]を[[数]]として表したものです。
* 負
[7] [[負]]の値 (1969年以前) は、環境や文脈によっては扱えないことがあります。
最近は多くの環境が[[負]]の値も扱えるようになっているようです。
* 特殊値
[72] [CODE[mktime]] や [CODE[time][time()]] は算出不能時に値 [N[-1]]
を返します。
[70] [TIME[1970年][year:1970]]を扱う必要がない場合に、値 [N[0]]
が「[[日時]]指定なし」など特別な意味を割り当てられることがあります。
* 秒未満
[37] [CODE[time_t]] は[[整数]]とするのが普通ですが、
それ以外では拡張して[[秒未満]]も含めた[DFN[小数のUnix time]]
を使うことがよくあります。
* 閏秒
[15] [[閏秒]]は考えません。
[SEE[ [[閏秒のない時刻系]] ]]
[67]
[[POSIX]] は1[[日]]の[[秒]]数を固定長としつつ、
実際の[[時刻]]との対応は[[未定義]]、[[実装定義]]とし
[SRC[>>10]]、[[閏秒]]の処置は曖昧にしています。
[[実装]]は [[leap smear]] などにより[[閏秒]]が存在しないものとして扱っています。
;; [38] [CODE[tm]] は[[閏秒]]を表現できることになっていますが、
[[Unix time]] で表現できないため有名無実となっています。
[69] [CODE[right/]] のような [[Unix]] システムで[[閏秒]]を扱う試みもありましたが、
[[Unix time]] との整合性を維持できず失敗しました。
* 時間帯
[83]
[[Unix time]] は [[UTC]] での [[Unix epoch]] からの経過時間を表しています。
[84]
どこのどんな[[地方時]] ([[標準時]]、[[サマータイム]])
を使っていて、それが [[UTC]] どどれだけの[[時差]]があるのであっても、
その[[時差情報][時差の記述]]は [[Unix time]]
に含めることはできません。
[[Unix time]] はどの瞬間であるかだけを表します。
[EG[
[85]
[[Unix time]]
[TIME[123456789]]
は、
[TIME[UTC の1973年11月29日21時33分9秒][1973-11-29T21:33:09Z]]を表します。
すなわち
[TIME[日本時間の昭和48(1973)年11月30日6時33分9秒][1973-11-29T21:33:09Z]]です。
]EG]
[86] [[時差]]に意味がある場合は、 [[Unix time]] とは別の方法で保持しなければなりません。
* 各言語・プロトコルの Unix time
** C と POSIX
[6] [[C言語]]は[[データ型]] ([CODE[typedef]]) [DFN[time_t]] を有しています [SRC[>>65]]。
[[ISO C]] はその値の精度や[[値域]]を定めていません [SRC[>>65]] が、
現在では[[実質]]すべての実装が [[POSIX]] の定める [DFN[Epoch][Unix Epoch]] すなわち
[TIME[1970年1月1日0時0分0秒 UTC][1970-01-01T00:00:00Z]] [SRC[>>18]] からの経過[[秒]]数
([DFN[Seconds Since the Epoch]]) [SRC[>>10]] の[[整数]]としています。
1970年未満については[[未定義]]としています [SRC[>>10]]。
伝統的には[[32ビット符号なし整数]]でしたが、
[[2038年問題]]があり[[64ビット符号なし整数]]への移行が進んでいます [SRC[>>66]]。
[68]
[[C言語]]は更に[[構造体]] [DFN[[CODE[timespec]]]]
を定めています。 [CODE[timespec]] は
[[非負]]の [CODE[time_t]] の値を持つ [DFN[[CODE[tv_sec]]]] と、
[ [N[0]], [N[999999999]] ] の [CODE[long]] 値を持つ [DFN[[CODE[tv_nsec]]]]
の組で構成されます。[[ナノ秒]]精度の[[時刻]]の表現に使われます。 [SRC[>>65]]
[SEE[ これらを使う他の関数は [CODE[time.t]] ]]
-*-*-
[11]
[[Perlにおける日時]]は[[プラットフォーム]]依存ですが、
ほとんどすべての場合 [[Unix time]] です。
場合によって[[小数]]の [[Unix time]] も使われます。
[SEE[ [[Perlにおける日時]] ]]
[71]
[[Ruby]] の [CODE[Time][Time (Ruby)]] は [[Unix time]]
を使っています。[[値域]]は[[プラットフォーム]]依存です。
[SEE[ [CODE[Time][Time (Ruby)]] ]]
[REFS[
- [65] [CITE[ISO/IEC 9899:yyyy - n2310.pdf]] ([TIME[2018-11-12 09:13:34 +09:00]]) <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf#page=287>
- [18] [CITE[Definitions]]
( ([TIME[2014-05-13 04:24:34 +09:00]] 版))
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_150>
- [10] [CITE[General Concepts]]
([TIME[2016-04-26 12:24:41 +09:00]] 版)
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_15>
-- 移転: [CITE[General Concepts]] ([TIME[2019-04-16 19:09:46 +09:00]]) <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>
- [66] [CITE@ja-jp[time_t ‐ 通信用語の基礎知識]] ([TIME[2019-04-16 19:04:11 +09:00]]) <https://www.wdic.org/w/TECH/time_t>
]REFS]
** gzip
[55] [[gzip]] の [[MTIME]] は、 [[Unix time]] を[[小エンディアン]]の
4バイト[[符号無し整数]]で表したものです。
[56] ただし、[N[0]] は[[タイムスタンプ]]なしを表します。
** ext ファイルシステムのタイムスタンプ
[SEE[ [[extの日時形式]] ]]
** PGP の時刻
[FIG(quote)[
[FIGCAPTION[
[5] [CITE@en[RFC 4880 - OpenPGP Message Format]]
([TIME[2015-04-05 14:41:03 +09:00]] 版)
<https://tools.ietf.org/html/rfc4880#section-3.5>
]FIGCAPTION]
> A time field is an unsigned four-octet number containing the number
of seconds elapsed since midnight, 1 January 1970 UTC.
]FIG]
** DKIM の時刻
[13]
[[RFC 4871]] が定義する [CODE(822)@en[[[DKIM-Signature]]:]]
[[頭欄]]の [CODE(822)@en[[[t]]=]] [[タグ]]の値は、
1970年1月1日0時0分0秒 ([[UTC]]) からの[[秒]]数とされています。
ただし、[[閏秒]]は数えません。 [[RFC 4871]] は、
実装に対して最低 10[SUP[12]] (≒ [[紀元後]]20万年、≒ 40ビット[[符号無し整数]])
までの値を扱えることを[['''推奨''']] ([['''SHOULD''']]) しています。
更に、[[サービス拒否攻撃]]防止のために、
12桁以上の値は[[無限大]]とみなして[['''構わない''']]
([['''MAY''']]) ともしています。
** SQL
[31] [[SQL]] では[[時間帯を持たない日時]]の[[データ型]]が使われることも多いですが、
その場合でも [[Unix time]] が使われることがあります。ここでの [[Unix time]]
は、本来の [TIME[1970年1月1日0時 UTC][0]] からの[[秒数]]ではなく、
[[地方時]]の[TIME[0時][00:00:00]]からの[[秒数]]とされています。
[20] [[MySQL]] では、 [CODE[UNIX_TIMESTAMP]] で[[日時]]を [[Unix time]] に、
[CODE[FROM_UNIXTIME]] で [[Unix time]] を[[日時]]に変換できます。
;; [32] [[SQLの日時形式]]も参照。
** OAuth の時刻
[2] [CODE(URI)@en[[[oauth_timestamp]]]] も [[Unix time]] 同等の定義となっています。
** OpenID の時刻
[FIG(quote)[
[FIGCAPTION[
[3] [CITE@en[Final: OpenID Connect Core 1.0 incorporating errata set 1]]
([TIME[2014-11-09 04:00:29 +09:00]] 版)
<http://openid.net/specs/openid-connect-core-1_0.html#rfc.section.2>
]FIGCAPTION]
> Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.
]FIG]
** CDNI の時刻
[FIG(quote)[
[FIGCAPTION[
[21] [CITE@en[RFC 8006 - Content Delivery Network Interconnection (CDNI) Metadata]]
([TIME[2016-12-14 14:55:04 +09:00]])
<https://tools.ietf.org/html/rfc8006#section-4.3.4>
]FIGCAPTION]
> A time value expressed in seconds since the UNIX epoch (i.e., zero
hours, zero minutes, zero seconds, on January 1, 1970) Coordinated
Universal Time (UTC) '''['''POSIX''']'''.
> Type: Integer
> Example time representing 09:00:00 01/01/2000 UTC:
946717200
]FIG]
[FIG(quote)[
[FIGCAPTION[
[22] [CITE@en[RFC 8007 - Content Delivery Network Interconnection (CDNI) Control Interface / Triggers]]
([TIME[2016-12-14 14:58:50 +09:00]])
<https://tools.ietf.org/html/rfc8007#section-5.2.5>
]FIGCAPTION]
> A JSON number, seconds since the UNIX epoch (00:00:00 UTC on
1 January 1970).
]FIG]
** TLS の時刻
[FIG(quote)[
[FIGCAPTION[
[4] [CITE@en[RFC 5246 - The Transport Layer Security (TLS) Protocol Version 1.2]]
([TIME[2015-02-19 08:58:15 +09:00]] 版)
<http://tools.ietf.org/html/rfc5246#section-7.4.1.2>
]FIGCAPTION]
>
:gmt_unix_time:
The current time and date in standard UNIX 32-bit format
(seconds since the midnight starting Jan 1, 1970, UTC, ignoring
leap seconds) according to the sender's internal clock. Clocks
are not required to be set correctly by the basic TLS protocol;
higher-level or application protocols may define additional
requirements. Note that, for historical reasons, the data
element is named using GMT, the predecessor of the current
worldwide time base, UTC.
]FIG]
** VMS の時刻
[SEE[ [[VMSの日時形式]] ]]
* [DFN[Java時刻]]、[DFN[JavaScript時刻]]
[14] [[Java]] の [CODE[Calendar]] [SRC[>>27]] や
[[JavaScript]] の [CODE(JS)@en[[[Date]]]] の値も [[Unix time]]
と同じ[[元期]]ですが、[[ミリ秒]][[単位]]となっています。 (こちらも[[閏秒]]は考えません。)
[24] [[DOM]] の[[日時]]を扱う [[API]] ([CODE[DOMTimeStamp]]) も、
[[ミリ秒]]単位の千倍 [[Unix time]] を用いています。
;; [45] [[JavaScriptの日時形式]]も参照。
[46]
[[DateTime Wire Format]] でも使われています。
[REFS[
[FIG(quote)[
[FIGCAPTION[
[27] [CITE@en[Calendar (Java Platform SE 7 )]]
([TIME[2014-02-20 11:18:28 +09:00]])
<http://docs.oracle.com/javase/jp/7/api/java/util/Calendar.html>
]FIGCAPTION]
> 特定の時点は、1970 年 1 月 1 日 00:00:00.000 GMT (グレゴリオ暦) を元期とするミリ秒単位のオフセットで表現できます。
]FIG]
]REFS]
* [DFN[Go時刻]]
[34] [[Go]] の [DFN[[CODE[Time][Time (Go)]]]] は、[[ナノ秒]]単位の [[Unix time]]
を用いています。
[REFS[
[FIG(quote)[
[FIGCAPTION[
[33] [CITE[time - The Go Programming Language]]
([TIME[2017-03-10 18:17:34 +09:00]])
<https://golang.org/pkg/time/#Time>
]FIGCAPTION]
> The zero value of type Time is January 1, year 1, 00:00:00.000000000 UTC.
]FIG]
]REFS]
* 桁溢れ問題
[59]
[DFN[2038年問題]]は、
[[Unix time]]
の[[桁溢れ問題]]です。
[75] [TIME[2004-02-11 00:45:51 +00:00]] ''[[名無しさん]]'': ''スラッシュドット ジャパン | 2038年問題、早くも顕在化'' <http://slashdot.jp/article.pl?sid=04/02/03/031211&topic=80>
[76] [CITE['''['''tz''']''' DST ends 2040 in Oracle database]]
([TIME[2019-01-26 06:59:55 +09:00]])
<https://mm.icann.org/pipermail/tz/2019-January/027438.html>
[77] [CITE@ja[Y2038ProofnessDesign - glibc wiki]]
([TIME[2019-03-04 16:06:52 +09:00]])
<https://sourceware.org/glibc/wiki/Y2038ProofnessDesign>
* 関連
[47]
[[PTP]] の[[元期]]も同じく[TIME[1970年1月1日0時][1970-01-01T00:00:00]]ですが、
[[TAI]] を使っているので [[Unix time]] とは少しずれています。
* メモ
[1] ''スラッシュドット ジャパン | 明日でepochから2^30秒'' <http://slashdot.jp/article.pl?sid=04/01/08/172200&mode=flat&commentsort=4&threshold=-1>
[16] [CITE@ja[time_t - Wikipedia]]
( ([TIME[2014-04-22 06:59:21 +09:00]] 版))
<http://ja.wikipedia.org/wiki/Time_t>
[17] [CITE@en[Unix time - Wikipedia, the free encyclopedia]]
( ([TIME[2014-05-11 13:26:43 +09:00]] 版))
<http://en.wikipedia.org/wiki/Unix_time>
[8] [CITE@ja[iPhoneを「1970年1月1日」に設定すると利用不能になる問題、Appleがソフト更新で解消へ - ITmedia ニュース]]
([TIME[2016-02-17 19:58:04 +09:00]] 版)
<http://www.itmedia.co.jp/news/articles/1602/16/news132.html>
[9] [CITE@ja[iPhoneで「1970年1月1日」に設定すると使用不能に? 実際に試してみた - ITmedia Mobile]]
([TIME[2016-02-17 19:59:19 +09:00]] 版)
<http://www.itmedia.co.jp/mobile/articles/1602/12/news125.html>
[19] [CITE@en[WebDriver]]
([TIME[2016-07-22 07:24:31 +09:00]])
<https://w3c.github.io/webdriver/webdriver-spec.html#dfn-unix-epoch>
[FIG(quote)[
[FIGCAPTION[
[26] [CITE@ja[電子機器の時刻]]
([TIME[2017-01-09 16:22:34 +09:00]])
<http://www.ffortune.net/calen/calen/etime.htm>
]FIGCAPTION]
> 2001年9月9日1時46分40秒にこの数字が十進数で9桁から10桁に変わりました。2chなどではこの数字を掲示板のidに使用しているため、この前後での掲示板の並べ替えがうまく行きません。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[28] ([TIME[2001-11-11 14:06:55 +09:00]])
<http://cr.yp.to/proto/utctai.html>
]FIGCAPTION]
> What is the epoch? Originally it was defined as the beginning of 1970 GMT. GMT, Greenwich Mean Time, is a traditional term for the time zone in England. Unfortunately, it is ambiguous; it can refer to a variety of astronomical time scales.
> Arthur David Olson's popular time library uses an epoch of 1970-01-01 00:00:10 TAI.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[29] [CITE[perlvms - search.cpan.org]]
([TIME[2017-02-13 00:40:55 +09:00]])
<http://search.cpan.org/dist/perl/pod/perlvms.pod#time>
]FIGCAPTION]
> The value returned by time is the offset in seconds from 01-JAN-1970 00:00:00 (just like the CRTL's times() routine), in order to make life easier for code coming in from the POSIX/Unix world.
]FIG]
[30] [CITE@en[File API]]
([TIME[2017-02-11 03:25:10 +09:00]])
<https://w3c.github.io/FileAPI/#UnixEpoch>
[FIG(quote)[
[FIGCAPTION[
[35] [CITE[time - The Go Programming Language]]
([TIME[2017-03-10 18:22:09 +09:00]])
<https://golang.org/pkg/time/#Time.UnixNano>
]FIGCAPTION]
> UnixNano returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC.
]FIG]
[36] [CITE@en[SANS Digital Forensics and Incident Response Blog | Understanding EXT4 (Part 2): Timestamps | SANS Institute]]
([TIME[2017-03-10 19:07:34 +09:00]])
<https://digital-forensics.sans.org/blog/2011/03/14/digital-forensics-understanding-ext4-part-2-timestamps>
[39] [CITE@en[Add PushSubscription.expirationTime (#248)]]
([[beverloo]]著, [TIME[2017-04-19 02:15:13 +09:00]])
<https://github.com/w3c/push-api/commit/73da6411aac80de7de9bf5e65ee8eb4cc6a9aa24>
[40] [CITE@en[Epoch (astronomy) - Wikipedia]]
([TIME[2017-05-08 07:11:20 +09:00]])
<https://en.wikipedia.org/wiki/Epoch_(astronomy)>
[41] [CITE[General Concepts]]
([TIME[2017-05-15 17:06:25 +09:00]])
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>
[FIG(quote)[
[FIGCAPTION[
[42] [CITE@en[RFC 7519 - JSON Web Token (JWT)]]
([TIME[2017-05-14 16:14:20 +09:00]])
<https://tools.ietf.org/html/rfc7519#section-2>
]FIGCAPTION]
> NumericDate
> A JSON numeric value representing the number of seconds from
> 1970-01-01T00:00:00Z UTC until the specified UTC date/time,
> ignoring leap seconds. This is equivalent to the IEEE Std 1003.1,
> 2013 Edition '''['''POSIX.1''']''' definition "Seconds Since the Epoch", in
> which each day is accounted for by exactly 86400 seconds, other
> than that non-integer values can be represented.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[43] [CITE@en[RFC 7049 - Concise Binary Object Representation (CBOR)]]
([TIME[2017-05-07 16:11:09 +09:00]])
<https://tools.ietf.org/html/rfc7049#section-2.4.1>
]FIGCAPTION]
> Tag value 1 is for numerical representation of seconds relative to
> 1970-01-01T00:00Z in UTC time. (For the non-negative values that the
> Portable Operating System Interface (POSIX) defines, the number of
> seconds is counted in the same way as for POSIX "seconds since the
> epoch" '''['''TIME_T''']'''.) The tagged item can be a positive or negative
> integer (major types 0 and 1), or a floating-point number (major type
> 7 with additional information 25, 26, or 27). Note that the number
> can be negative (time before 1970-01-01T00:00Z) and, if a floating-
> point number, indicate fractional seconds.
]FIG]
[81] [CITE@ja[MessagePackフォーマット仕様にTimestamp型を追加 - Blog by Sadayuki Furuhashi]] ([TIME[2019-09-27 10:27:34 +09:00]]) <http://frsyuki.hatenablog.com/entry/2017/08/10/144310>
[82] [CITE@en[msgpack/spec.md at master · msgpack/msgpack]] ([TIME[2019-09-27 20:33:37 +09:00]]) <https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type>
[FIG(quote)[
[FIGCAPTION[
[44] [CITE@en[レシートのフィールド]]
([TIME[2017-05-18 00:39:47 +09:00]])
<https://developer.apple.com/jp/documentation/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html>
]FIGCAPTION]
> 定期購読の有効期限が、1970年1月1日 00:00:00 GMTからのミリ秒単位で表されています。
> ASN.1フィールドタイプ:1708
> ASN.1フィールド値: IA5STRING(RFC 3339の日付として解釈されます)
> JSONフィールド名:expires_date
> JSONフィールド値:数値
]FIG]
[FIG(quote)[
[FIGCAPTION[
[48] [CITE@ja[プログラマーの常識をJavaで身につける(4):OSとプログラミングの「時間」に関する常識 (1/3) - @IT]]
([TIME[2017-06-08 18:49:20 +09:00]])
<http://www.atmarkit.co.jp/ait/articles/0703/28/news135.html>
]FIGCAPTION]
> 具体的には、1970年1月1日 00:00:00 GMTからのミリ秒数を表すlong値として表現されています。この原稿では、これを便宜的に「エポックからのミリ秒」と呼ぶことにします。なお、1970年1月1日 00:00:00 GMTについてJava言語APIでは、「エポック」と呼んでいます。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[49] [CITE[日付関数またはタイムスタンプ関数の日付部分 - Amazon Redshift]]
([TIME[2017-06-08 07:42:07 +09:00]])
<http://docs.aws.amazon.com/ja_jp/redshift/latest/dg/r_Dateparts_for_datetime_functions.html>
]FIGCAPTION]
> Amazon Redshift の EPOCH の実装は、サーバーのあるタイムゾーンから独立した 1970-01-01 00:00:00.000000 に関連します。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[50] [CITE@ja-jp[タイムスタンプ型 | CQL for Cassandra 2.x]]
([TIME[2017-05-23 01:28:12 +09:00]])
<https://docs.datastax.com/ja/cql-jajp/3.1/cql/cql_reference/timestamp_type_r.html>
]FIGCAPTION]
> タイムスタンプ型の値は64ビットの符号付き整数としてエンコードされ、エポックとして知られる標準基準時間(1970年1月1日、GMT時間0時0分0秒)からのミリ秒数を表します。
]FIG]
[FIG(quote)[
[FIGCAPTION[
[51] [CITE@en[GitHub API v3 | GitHub Developer Guide]]
([TIME[2017-06-10 05:53:45 +09:00]])
<https://developer.github.com/v3/#rate-limiting>
]FIGCAPTION]
> The time at which the current rate limit window resets in UTC epoch seconds.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[52] [CITE@en[docker service logs | Docker Documentation]]
([TIME[2017-06-10 10:22:13 +09:00]])
<https://docs.docker.com/engine/reference/commandline/service_logs/#extended-description>
]FIGCAPTION]
> When providing Unix timestamps enter seconds'''['''.nanoseconds''']''', where seconds is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a fraction of a second no more than nine digits long.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[53] [CITE[取引所APIドキュメント | Coincheck(コインチェック)]]
([TIME[2017-06-22 11:12:30 +09:00]])
<https://coincheck.com/ja/documents/exchange/api>
]FIGCAPTION]
> ACCESS-NONCE 毎リクエストごとに増加する必要のある正の整数。通常はUNIXタイムスタンプを用います。最大値は 9223372036854775807 です。APIキーごとに管理されます。
]FIG]
[54] [CITE@en[Make Event's timeStamp use DOMHighResTimeStamp]]
([[majido]]著, [TIME[2017-07-13 16:38:55 +09:00]])
<https://github.com/whatwg/dom/commit/912d58746bc4c67c2fd210124639f7c34991fce5>
[FIG(quote)[
[FIGCAPTION[
[57] [CITE@en[Git - git-commit Documentation]]
([TIME[2018-03-04 14:30:18 +09:00]])
<https://git-scm.com/docs/git-commit#_date_formats>
]FIGCAPTION]
> Git internal format
> It is <unix timestamp> <time zone offset>, where <unix timestamp> is the number of seconds since the UNIX epoch. <time zone offset> is a positive or negative offset from UTC. For example CET (which is 1 hour ahead of UTC) is +0100.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[58] [CITE@en[Concise Binary Object Representation (CBOR)]]
([TIME[2018-02-23 07:30:37 +09:00]])
<https://cbor-wg.github.io/CBORbis/#datetimesect>
]FIGCAPTION]
> Tag value 1 is for numerical representation of seconds relative to 1970-01-01T00:00Z in UTC time. (For the non-negative values that the Portable Operating System Interface (POSIX) defines, the number of seconds is counted in the same way as for POSIX “seconds since the epoch” '''['''TIME_T''']'''.) The tagged item can be a positive or negative integer (major types 0 and 1), or a floating-point number (major type 7 with additional information 25, 26, or 27). Note that the number can be negative (time before 1970-01-01T00:00Z) and, if a floating-point number, indicate fractional seconds.
]FIG]
[60] [CITE@en[Unix time - Wikipedia]]
([TIME[2018-09-29 18:11:15 +09:00]])
<https://en.wikipedia.org/wiki/Unix_time>
[FIG(quote)[
[FIGCAPTION[
[61] [CITE[LHA解説書]]
([TIME[2012-10-06 14:39:51 +09:00]])
<http://techno7.co.jp/jimuki/new2000/lha/index.htm>
]FIGCAPTION]
> LHA では内部的にタイムスタンプを 1970-01-01 00:00:00 UTC からの通算秒
に変換しています。このため、実在しないスタンプ(80-00-00 など)を持った
ファイルを格納した場合、タイムスタンプは不定となります。
]FIG]
[62] しかし保存先は [[MS-DOSの日時形式]]らしい。
[FIG(quote)[
[FIGCAPTION[
[63] [CITE@ja-jp[LHAフォーマット ‐ 通信用語の基礎知識]]
([TIME[2018-10-14 01:39:52 +09:00]])
<https://www.wdic.org/w/TECH/LHA%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88>
]FIGCAPTION]
> 03h DWORD 最終更新日時 (time_t形式)
>
]FIG]
[FIG(quote)[
[FIGCAPTION[
[64] [CITE[gzip-1.9 released '''['''stable''']''']]
([TIME[2018-01-08 08:44:44 +09:00]])
<https://lists.gnu.org/archive/html/info-gnu/2018-01/msg00004.html>
]FIGCAPTION]
> When converting from system-dependent time_t format to the 32-bit
> unsigned MTIME format used in gzip files, if a timestamp does not
> fit gzip now substitutes zero instead of the timestamp's low-order
> 32 bits, as per Internet RFC 1952. When converting from MTIME to
> time_t format, if a timestamp does not fit gzip now warns and
> substitutes the nearest in-range value instead of crashing or
> silently substituting an implementation-defined value (typically,
> the timestamp's low-order bits). This affects timestamps before
> 1970 and after 2106, and timestamps after 2038 on platforms with
> 32-bit signed time_t. '''['''bug present since the beginning''']'''
]FIG]
[73] [CITE@en[msgpack/spec.md at master · msgpack/msgpack]]
([TIME[2019-07-14 10:38:22 +09:00]])
<https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type>
[74] [CITE@en[RFC 7049 - Concise Binary Object Representation (CBOR)]]
([TIME[2019-07-08 01:31:11 +09:00]])
<https://tools.ietf.org/html/rfc7049#section-2.4.1>
[78] [CITE@ja[第25回 32ビット環境に迫る「2038年問題」 時計がおかしくなると…… (1/3) - ITmedia エンタープライズ]]
([TIME[2019-07-29 12:07:37 +09:00]])
<https://www.itmedia.co.jp/enterprise/articles/1607/13/news020.html>
[79] [CITE@ja[KDDI、「2038年問題」で1346万円を過剰請求 - ITmedia NEWS]]
([TIME[2019-07-29 12:09:47 +09:00]])
<https://www.itmedia.co.jp/news/articles/0403/08/news023.html>
[80] [CITE@en[Package google.protobuf | Protocol Buffers | Google Developers]]
([TIME[2019-06-20 23:04:44 +09:00]])
<https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp>
[87] [CITE[9月 9日 コンピュータの9月9日問題が発生(2001年)(ブルーバックス編集部) | ブルーバックス | 講談社]]
([TIME[2019-11-10 09:37:51 +09:00]])
<https://gendai.ismedia.jp/articles/-/66915>
[88] [CITE@ar[上原 哲太郎/Tetsu. Uehara على تويتر: "いまいち認知が広がらない2038年問題ですが、Siriは知っています。Siriに世界の終わりを聞くとこう答えることがあります。… "]]
(午前7:57 · 2018年9月26日 [TIME[2019-11-15 11:12:53 +09:00]])
<https://twitter.com/tetsutalow/status/1044722692576829440>
[FIG(quote)[
[FIGCAPTION[
[89] [CITE@ja[KDDI、「2038年問題」で1346万円を過剰請求 - ITmedia NEWS]]
(2004年03月08日 16時56分 公開 [TIME[2020-01-02 22:08:40 +09:00]])
<https://www.itmedia.co.jp/news/articles/0403/08/news023.html>
]FIGCAPTION]
> 2004年03月08日 16時56分 公開
]FIG]