From 48e68fbfd181f4c23a52021dc27cc45fea75fa25 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 12 Nov 2020 12:45:42 -0800 Subject: [PATCH] Document "right" seconds better * tz-link.html (Precision timekeeping): Clarify "right" vs "posix" time_t. --- tz-link.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tz-link.html b/tz-link.html index 10c40b5..eb4a235 100644 --- a/tz-link.html +++ b/tz-link.html @@ -1034,8 +1034,19 @@ title="International Earth Rotation and Reference Systems Service">IERS Bulletins contains official publications of the International Earth Rotation and Reference Systems Service, which decides when leap seconds occur. The tz code and data support leap seconds -via an optional "right" configuration, as opposed to the -default "posix" configuration. +via an optional "right" configuration where a computer's internal +time_t integer clock counts every TAI second, +as opposed to the default "posix" configuration +where the internal clock ignores leap seconds. +The two configurations agree for timestamps starting with 1972-01-01 00:00:00 +UTC (time_t 63 072 000) and diverge for +timestamps starting with time_t 78 796 800, +which corresponds to the first leap second +1972-06-30 23:59:60 UTC in the "right" configuration, and to +1972-07-01 00:00:00 UTC in the "posix" configuration. +In practice the two configurations also agree for timestamps before +1972 even though the historical situation is messy, partly because +neither UTC nor TAI is well-defined for sufficiently-old timestamps.
  • Leap Smear discusses how to gradually adjust POSIX clocks near a leap second so that they disagree with UTC by at most a -- 1.8.3.1