You might find Steve Allan's analysis of how many leap-seconds there could be interesting:

https://www.ucolick.org/~sla/leapsecs/dutc.html

-Brooks


On 2026-07-17 06:34 PM, Paul Eggert via tz wrote:
On 2026-07-17 14:02, Doug Ewell via tz wrote:
I sure hope I’ve never built software that subtracts one second by skipping two.

Good catch. This reminds me of the error in C89, which allowed two adjacent positive leap seconds. That mistake wasn't fixed until C99 and POSIX.1-2001, and a lot of popular software still supports the mistake. For example, although Python 3.14.6 rejects out-of-range seconds counts, it allows the counts up through 61, i.e., it mimics the C89 error:

>>> import time
>>> time.asctime((2026, 12, 31, 23, 59, 59, 3, 365, 0))
'Thu Dec 31 23:59:59 2026'
>>> time.asctime((2026, 12, 31, 23, 59, 60, 3, 365, 0))
'Thu Dec 31 23:59:60 2026'
>>> time.asctime((2026, 12, 31, 23, 59, 61, 3, 365, 0))
'Thu Dec 31 23:59:61 2026'
>>> time.asctime((2026, 12, 31, 23, 59, 62, 3, 365, 0))
Traceback (most recent call last):
  File "<python-input-4>", line 1, in <module>
    time.asctime((2026, 12, 31, 23, 59, 62, 3, 365, 0))
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: seconds out of range


For what it's worth, in a hypothetical and impractical approach where we continued to insert one or two leap seconds as needed, possibly in every minute, I estimate we could keep that up for over 100 million years before an Earth day would be so long that we'd at least occasionally have to go to three inserted leap seconds per minute. It's unlikely that this sort of thing is what C89's authors and Python's developers were thinking of.

Reply via email to