Time for Civility

Save civil time, and be kind to our engineers

2022-11-20 Previous Home Next

On Friday, the international organization that decides how to keep the world's time, voted to stop something called "leap seconds."

Why these leap seconds were created, and why they won't be any more, is an interesting story.

clock warped

SI second and the atomic stream of time

The science of measurement, metrology, defines the units used to measure length, mass, time, and so on. In particular, we use the SI second as a duration of time. (SI stands for the French term for International System).

We count time as a stream of SI seconds. The stream is:

The SI second is defined in terms of the frequency of radiation emitted by certain type of atom under certain conditions. The International Bureau of Weights and Measures (BIPM) averages the time kept by hundreds of atomic clocks all over the world to define an SI second.

The BIPM tracks and broadcasts how many SI seconds have passed since the beginning of 1958. This is called International Atomic Time, or as we might call it, the "atomic stream."

In this stream, you can show the time at any given instant either as a total number of seconds since the epoch, which will be a number in the billions, or as a calendar-clock time stamp like 2022-11-20 20:18:31. They are simply two different ways of writing the same thing, perfectly interchangeable.

This standard works very well:

How clocks get their time: UTC

To catch a train, drop a child off to school, or attend a meeting, we use "civil time," shown by clocks and calendars. Civil time is based on the earth's rotation.

An organization of astronomers and geophysicists, IERS, specializes in measuring the rotation of the earth. Based on their measurements, the BIPM periodically broadcasts a standard universal coordinated time, UTC.

UTC defines the time at the prime meridian that passes through Greenwich, England. Civil authorities everywhere decide on a convenient offset from UTC for the timezone they want.

So, that's how clocks get their time.

Leap seconds

Unfortunately, the earth's rotation is not consistent. The average day in one year can be a few milliseconds (thousandths of a second) larger or smaller than one in another year. We know this because the IERS records its rotation measurements using SI seconds.

Over the past few decades until about 2016, the Earth has been spinning slightly slower than 24 hours a day. A full day should take exactly 86,400 seconds, but the earth often takes a few milliseconds longer. Every day, one UTC day usually finishes slightly before the earth's rotation.

When the accumulated difference between all the UTC days and the earth's measured rotations becomes close to a full second, then the IERS picks a day at the end of a month and asks the BIPM to add one second to UTC to compensate, so that clocks will continue to indicate an actual earth day to within one second.

When this extra second is added, then clocks that usually go from 23:59:59 to 00:00:00 at midnight will instead first go to 23:59:60, marking time for an extra second, and then to 00:00:00.

The scientists try to limit this fudging of the books to no more than once every six months or so. Twenty-seven such "leap seconds" have been added since the BIPM started doing this back in 1972.

As you can see, UTC is not a proper, continuous time stream. It has breaks in it wherever leap seconds have been added. When you receive a package with a computer-generated time stamp, it is showing this fudged UTC number, not the actual number of seconds according to the atomic stream.

The problem with leap seconds

A slightly wrong time stamp on a parcel might not matter. But in recent times, civilian life has become intertwined with scientific measurements. Transportation, location, defense, finance, and so on---all of these require their time stamps to be verifiable using civilian clocks.

The brunt of this reconciliation requirement falls on computer programmers. Whenever you want to calculate the elapsed time between two events, you can't just subtract their time stamps. You need to keep track of exactly when leap seconds were added to UTC in the past.

Timing calculations done in computer software become complicated. In domains where microseconds matter, you can't assume that a later time stamp will be larger than an earlier one.

This mode of working causes all sorts of secondary headaches, which are visible to civilians only when something goes wrong. When we get rid of leap seconds, we will force all clocks to count time using a uniform stream, and these headaches will go away.

As the earth's rotation period continues to drift, we might still have to reconcile the clocks when they get many minutes out of whack, say, once in a century, but that can be a planned event. Hence the relief.