-
Notifications
You must be signed in to change notification settings - Fork 4
/
183.txt
98 lines (70 loc) · 3.47 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
[REFS[
- [6] [CITE@en[1970-01-01T00:00:00Z (date and time) - SuikaWiki Data]] ([TIME[2015-12-15 23:35:58 +09:00]] 版) <https://data.suikawiki.org/datetime/0>
]REFS]
* 定義
** 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''']]) ともしています。
* 文脈
[2] [CODE(URI)@en[[[oauth_timestamp]]]] も同等の定義となっています。
* 負
[7] [[負]]の値 (1969年以前) は、環境や文脈によっては扱えないことがあります。
最近は多くの環境が[[負]]の値も扱えるようになっているようです。
* 閏秒
[15] [[閏秒]]は考えません。
* 関連
[14] [[JavaScript]] の [CODE(JS)@en[[[Date]]]] の値も [[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>
[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>
[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]
[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]
[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]