Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that Unix timestamps disregard leap seconds since 1970 #1627

Merged
merged 3 commits into from Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/appendices/newsfragments/1627.clarification
@@ -0,0 +1 @@
Clarify timestamp specification with respect to leap seconds.
13 changes: 10 additions & 3 deletions content/_index.md
Expand Up @@ -419,9 +419,16 @@ into the `m.` namespace.

### Timestamps

Unless otherwise stated, timestamps are measured as milliseconds since
the Unix epoch. Throughout the specification this may be referred to as
POSIX, Unix, or just "time in milliseconds".
Unless otherwise stated, timestamps are the number of milliseconds
elapsed since the unix epoch (1970-01-01 00:00:00 UTC), but not counting
leap seconds, so that each day is precisely 86,400,000 milliseconds.

This means that timestamps can repeat during leap seconds. Most
programming languages provide timestamps in that format natively, e.g.
[ECMAScript](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range).
Throughout the specification this may be referred to as POSIX,
[Unix](https://en.wikipedia.org/wiki/Unix_time), or just "time in
milliseconds".

## Specification Versions

Expand Down