From a1b832960c60e00f32b8c810189f689dc2d2d493 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Thu, 24 Aug 2023 08:11:47 +0200 Subject: [PATCH] Clarify that Unix timestamps disregard leap seconds since 1970 (#1627) Fixes #1626. --- .../appendices/newsfragments/1627.clarification | 1 + content/_index.md | 13 ++++++++++--- 2 files changed, 11 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 00000000..44775447 --- /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 69832f2e..a8c53809 100644 --- a/content/_index.md +++ b/content/_index.md @@ -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