.@ Date, Time, and Leap Seconds


I have an idle fascination with matters of time and date, so I have written a number of articles and bits of code — although it’s just a hobby with no ambitions to be practical or useful to anyone but me (and mostly not even then).

gregorian calendar

Counting the days - tiny routines for converting Gregorian dates into linear counts, like Julian day numbers or Unix time_t.

The date of the count - a small routine for converting linear day counts into Gregorian dates.

Most implementations I have seen of these functions use some kind of iterative search to find the right result. My versions use arithmetic like Zeller’s congruence to go directly to the result.

time zones

iCalendar is wrong - standard calendaring data models have a confusing way to handle time zones, which could (in theory) be improved.

Timezone display by MUAs can be confusing (and improved) in a similar way.

A related annoyance is that the Unicode CLDR has standard “friendly” localized descriptions for time zone names, which are very confusing and often wrong for more than half the year.

I wrote a little datez utility in Rust to help me deal with these problems.

chronophage clock

There’s a spectacular clock in the centre of Cambridge. I wrote a few blog articles about it when it was new in 2008/9:

where does time come from?

At the RIPE86 meeting I gave a short presentation on where time comes from. I have a blog version of the talk and some notes on the talk. Geoff Huston wrote about the talk.

compact leap seconds list

I publish cryptographically signed lists of leap seconds in the DNS at leapsecond.dotat.at in various formats:

I have a specification and reference implementation in Rust for my compact leap second list formats (TXT and TYPE65432 above):

You can find the code for drawing the leap second clock logo above in the leapsecs documentation.

leap second hiatus

The last leap second was at the end of 2016, and the current gap is going to be longer than the previous record of 7 years (1999-2005).

Unlike last time, the earth has sped up so much that since the end of 2020 it now takes less than 24 * 60 * 60 seconds to rotate each day (it always used to be longer). This brings us the prospect of a negative leap second !!!!!

I wrote a blog article in November 2020 when this first came to my attention.

This hiatus might become permanent if leap seconds are abolished. I have written some notes on the plans for leap seconds following the 2022 CGPM. (This is, roughly speaking, round two of the effort to abolish leap seconds, which has now been going on for over 20 years.)

past leap seconds

There was an awkward gap from the start of TAI to the start of UTC, when the difference between atomic time and civil time was represented with varying “rubber seconds”. I suggested proleptic UTC as a way to make it easier to bridge the gap with fixed atomic seconds.

next leap second

I have a Rust program that makes a guesstimate of when the next leap second will occur, and whether it will be positive or negative. It uses the long-term projection formula from IERS Bulletin A.

twitter threads

My off-the-cuff wittering on this topic occured on Twitter and now the Mended Drum, where they are hard to find and difficult to navigate, so I have collected them here:

IERS bulletins

I pay attention to three of the IERS bulletins (C and D by subscribing to email notifications):

other resources