Skip to content

Commit a1b8329

Browse files
authored
Clarify that Unix timestamps disregard leap seconds since 1970 (#1627)
Fixes #1626.
1 parent ca456a4 commit a1b8329

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify timestamp specification with respect to leap seconds.

content/_index.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,16 @@ into the `m.` namespace.
419419

420420
### Timestamps
421421

422-
Unless otherwise stated, timestamps are measured as milliseconds since
423-
the Unix epoch. Throughout the specification this may be referred to as
424-
POSIX, Unix, or just "time in milliseconds".
422+
Unless otherwise stated, timestamps are the number of milliseconds
423+
elapsed since the unix epoch (1970-01-01 00:00:00 UTC), but not counting
424+
leap seconds, so that each day is precisely 86,400,000 milliseconds.
425+
426+
This means that timestamps can repeat during leap seconds. Most
427+
programming languages provide timestamps in that format natively, e.g.
428+
[ECMAScript](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range).
429+
Throughout the specification this may be referred to as POSIX,
430+
[Unix](https://en.wikipedia.org/wiki/Unix_time), or just "time in
431+
milliseconds".
425432

426433
## Specification Versions
427434

0 commit comments

Comments
 (0)