From 47da6ad4cc055b638ab4d5edb9644f6b1b0b6b50 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Tue, 22 Aug 2023 17:36:36 +0200 Subject: [PATCH 1/3] Clarify that Unix timestamps disregard leap seconds since 1970 Fixes #1626. --- .../appendices/newsfragments/1627.clarification | 1 + content/_index.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 changelogs/appendices/newsfragments/1627.clarification diff --git a/changelogs/appendices/newsfragments/1627.clarification b/changelogs/appendices/newsfragments/1627.clarification new file mode 100644 index 000000000..ebb329875 --- /dev/null +++ b/changelogs/appendices/newsfragments/1627.clarification @@ -0,0 +1 @@ +Clarify timestamp specification with respect to leap seconds diff --git a/content/_index.md b/content/_index.md index 69832f2eb..3a5950892 100644 --- a/content/_index.md +++ b/content/_index.md @@ -419,9 +419,14 @@ 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 [Unix +timestamps](https://en.wikipedia.org/wiki/Unix_time), but measured in +milliseconds. This means, they approximate the number of milliseconds +since 1970-01-01 00:00:00.000 UTC, but disregard leap seconds so that +each day is precisely 86,400,000 milliseconds. This also means that +timestamps can repeat. Most programming languages provide timestamps in +that format natively. Throughout the specification this may be referred +to as POSIX, Unix, or just "time in milliseconds". ## Specification Versions From 85c53a42d4a7b71ac19531e765b271a919985dc6 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Wed, 23 Aug 2023 13:49:09 +0200 Subject: [PATCH 2/3] Simplify timestamp explanation --- content/_index.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/content/_index.md b/content/_index.md index 3a5950892..8a4790890 100644 --- a/content/_index.md +++ b/content/_index.md @@ -419,14 +419,16 @@ into the `m.` namespace. ### Timestamps -Unless otherwise stated, timestamps are [Unix -timestamps](https://en.wikipedia.org/wiki/Unix_time), but measured in -milliseconds. This means, they approximate the number of milliseconds -since 1970-01-01 00:00:00.000 UTC, but disregard leap seconds so that -each day is precisely 86,400,000 milliseconds. This also means that -timestamps can repeat. Most programming languages provide timestamps in -that format natively. Throughout the specification this may be referred -to as POSIX, Unix, or just "time in milliseconds". +Unless otherwise stated, are 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 From a9700fc7459c6ca3646041e38281ffd73e98fe69 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 24 Aug 2023 07:10:17 +0100 Subject: [PATCH 3/3] Apply suggestions from code review --- changelogs/appendices/newsfragments/1627.clarification | 2 +- content/_index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/appendices/newsfragments/1627.clarification b/changelogs/appendices/newsfragments/1627.clarification index ebb329875..44775447f 100644 --- a/changelogs/appendices/newsfragments/1627.clarification +++ b/changelogs/appendices/newsfragments/1627.clarification @@ -1 +1 @@ -Clarify timestamp specification with respect to leap seconds +Clarify timestamp specification with respect to leap seconds. diff --git a/content/_index.md b/content/_index.md index 8a4790890..a8c538094 100644 --- a/content/_index.md +++ b/content/_index.md @@ -419,7 +419,7 @@ into the `m.` namespace. ### Timestamps -Unless otherwise stated, are timestamps are the number of 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.