What Time Is It?

Gikii VI presentation

Given 2011-06-27

This page last updated 2018-04-14

Introduction

This is a presentation that I gave to the Gikii VI conference in Göteborg, Sweden. The Gikii series of law conferences discuss - in a light-hearted way - the way that the law interacts with present and future technology.

In my more recent presentations I've tried to avoid "death by Powerpoint", so these slides have more illustrations and less text, meaning more notes. I also haven't spent ages playing with HTML to exactly reproduce the appearance of the slides or the animations, so there are minor differences between these slides and the original live talk.

My thanks to Jutta Degener and Mark Brader for proof-reading this page.

WHAT TIME IS IT?

 
 

Clive D.W. Feather

University of Edinburgh (sometimes)
clive@davros.org

I took my LL.M. at the University of Edinburgh and, at the time, was doing some teaching for them.

TIME - WHAT IS IT?

(This was originally an animation, with the words "WHAT" and "TIME" exchanging places.)

I introduced the talk with: "This presentation will take 17 minutes and 43 seconds. If you get a different length, you didn't understand it."

The hope, of course, was that this would let me get away with overrunning my allocated time.

Promise
E = mc²Ĥ|ψ> = E|ψ>

This isn't going to be a heavy technical talk, so I promise no relativity or quantum mechanics.

But I couldn't resist this.

(For those not familiar with quantum mechanics, "Schrödinger's Cat" is a famous thought-experiment involving a cat in a sealed box.)

(For those not familiar with Gikii, LOLcats are an expected part of presentations.)

Time was originally measured by the movement of the sun across the sky. So sunrise would be the first hour, midday the sixth hour, and sunset the 12th hour.

Of course, later we moved to making 12 o'clock the middle of the day, but the principle is still the same.

Which, of course, leads to measuring time with sundials.

And bigger sundials.

This works well in places like Alexandria, where the night and day are roughly equal lengths throughout the year, and isn't too bad in Athens or Rome, but by the time we get to London, the shortest day is about half the longest and therefore hours vary in length by a factor of two. At the northernmost reach of the Roman empire (Mons Graupius was the site of a battle in 83 or 84 CE believed to be near Inverness; certainly Roman forts were sited that far north) it has become 3:1.

So now we have to look at other technologies, like the flow of sand through a narrow gap, or the clepsydra, which involved water flowing from bucket to bucket.

I would sooner expect agreement between philosophers lawyers than between clocks.

Seneca, possibly after Claudius

(Seneca wrote "philosophers", but who can resist a lawyer joke?)

 
 

What day is it?

Though this talk is mostly about time, I had to make a brief digression into calendars because of where the original talk was given (Göteborg, Sweden).

Thirty days hath September,

April, June, and November

 
 

and February in Sweden

(in 1712)

What's going on here?

Well, as part of the conversion between the Julian and Gregorian calendars, of which more in a moment, Sweden had to eliminate 11 days. Rather than doing it in one burst (as Great Britain did in 1752), they decided to omit the next 11 February 29ths.

They did this in 1700, but the Great Northern War with Peter the Great et.al. led to everyone forgetting to do the next two. So in 1712 the policy was reversed, meaning they had both a February 29th because it was a leap year, but also a February 30th to get back to the original Julian calendar. (Sweden then did the jump in one go some years later.)

At least, "forgetting because of the war" is the official story. My personal theory is that Someone Important, or Someone Important's wife or mistress, suddenly realized they weren't going to get birthday presents for the next 44 years and kicked up a fuss.

Deinde, ne in posterum a XII Kalendas Aprilis æquinoctium recedat, statuimus bissextum quarto quoque anno (uti mos est) continuari debere, præterquam in centesimis annis; qui, quamvis bissextiles antea semper fuerint, qualem etiam esse volumus annum MDC, post eum tamen qui deinceps consequentur centesimi non omnes bissextiles sint, sed in quadringentis quibusque annis primi quique tres centesimi sine bissexto transigantur, quartus vero quisque centesimus bissextilis sit, ita ut annus MDCC, MDCCC, MDCCCC bissextiles non sint. Anno vero MM, more consueto dies bissextus intercaletur, Februario dies XXIX continente, idemque ordo intermittendi intercalandique bissextum diem in quadringentis quibusque annis perpetuo conservetur.

Julius Caesar reformed the Roman calendar to form what is known as the Julian calendar, in which every year divisible by 4 is a leap year. But by the 16th century it was clear that the calendar - and in particular Easter - was drifting against the seasons, because the year is actually 365.2422 days long and not 365.25.

In 1581 Pope Gregory XIII issued the bull Inter Gravissimas to fix this. Here we see the relevant part of the bull, stating that from now on century years not divisible by 400, such as 1700, 1800, and 1900, will not be leap years ("bissextile"), but 2000 will be.

(The Gregorian calendar actually makes the average year be 365.2425 days long. The remaining error works out as 1 day every 3300 years or so. Despite what some web sites claim, there are no official proposals to address this.)

bool is_leap (int year)
{
    assert (year >= 1752);
    return year % 4 == 0 && year % 100 != 0 ||
           year % 400 == 0;
}

Or, as a C programmer would put it.

Cap. XXIII. anno vicesimo quarto GEORGII II.

An Act for Regulating the Commencement of the Year; and for Correcting the Calendar now in Use.

WHEREAS the legal Supputation of the Year of our Lord in that Part of Great Britain called England, according to which the Year beginneth on the 25th Day of March, hath been found by Experience to be attended with divers Inconveniencies, not only as it differs from the Usage of neighbouring Nations, but also from the legal Method of Computation in that Part of Great Britain called Scotlond, and from the common Usage throughout the whole Kingdom, and thereby frequent Mistakes are occasioned in the Dates of Deeds, and other Writings, and Disputes arise therefrom:

The British would have nothing to do with such Papist claptrap and remained on the Julian calendar (as did most Protestant countries). It was only in 1750 that they finally gave up and decided to make the change. The Calendar (New Style) Act 1750 changed the first day of the year (which was March 25th in England), dealt with losing 11 days to bring the calendar in line with the seasons, and introduced new rules for the date of Easter. Rather than adopting the rules in the papal bull, the Act introduced a completely different algorithm for calculating Easter, one that just happened to always produce the same result.

Thus we see an early example of the British approach of rewriting European legislation when adopting it.

(This is a legal joke: when a European Directive is issued, most countries simply pass a short law saying something like "Directive 123/456 is now part of national law". But the UK insists on comletely rewriting it in different wording, sometimes leading to problems of interpretation.)

Note, incidentally, the obsolete term "supputation" (which the OED last notes being seen in 1905) and the unusual spelling of "Scotlond" (though that's probably just a typo).

This is an "analemma". The sun was photographed once a week at exactly the same time (according to a modern clock). The up and down motion is due to the earth's tilt and the seasons - the sun is higher in the sky in the summer than the winter. But the left-and-right motion shows that some days (in the sense of midday to midday, not sunrise to sunset) are longer than others.

The formal description of this latter variation is called the "equation of time". It means a sundial can be up to 16 minutes fast (in November) or 14 minutes slow (in February). It's caused by an interaction between the tilt of the earth and fact that the earth's orbit isn't a circle, meaning the earth moves faster along its orbit in January than in July.

This is a "transit telescope" - it can only move on a north-south axis (toward or away from the camera), but can't turn east or west. By timing when individual stars or the sun appear in the telescope, we can calculate exactly how long a day is. The earth's rate of rotation compared with the distant ("fixed") stars is constant (though more on that later), so we can use that to determine the average, or "mean" length of the solar day over the year.

Because clocks and watches run at a steady rate, that's the length of day that people used, dividing it into 24 "mean hours" that are always the same length, rather than being longer in some months and shorter in others according to the equation of time. The average time of the meridian - the moment when the sun is highest in the sky - at a place was 12:00 "local mean time" at that place and, in the 18th and early 19th centuries, the church clock or your pocket watch would be set to local mean time where you lived. You'd need to change the time when going east or west (by about one minute every 10 miles in the UK), but since most people didn't move around a lot, that wasn't a major issue.

Then came the railways.

Local mean time in York is 4 minutes behind Greenwich, Bristol 10 minutes, Liverpool 12 minutes, Glasgow 17 minutes, and Penzance 22 minutes behind Greenwich. While in principle you could use the local mean time at each station, passengers would have to change their watch at each stop. So in 1848 the railways in Britain decided to use Greenwich Mean Time for all their timetables; in the USA they similarly adopted four standard times (GMT minus 5, 6, 7, and 8 hours) in 1883.

This is the clock on the Corn Exchange, Bristol. The thin hand pointing to just past the I is not a second hand but, rather, a second minute hand. The thick minute hand shows Bristol mean time while the thin one shows "railway time" (Greenwich Mean Time).

Curtis v March

(1858) 3 Hurl. & N 866, 157 E.R. 719

Case at Dorchester Assizes.

Dorchester is 2°26' west of Greenwich, so local mean time is 9'45" later than GMT.

Case set for 10 a.m. Court clock set to GMT.

No defendant, so summary judgement.

Defendant arrives at 9:58½ by the town clock.

As the slide says. (Summary judgement means that the judge decided the case while only hearing one side's version; it's allowed if the other side doesn't turn up.)

Pollock C.B.

"I cannot assent to the argument that the town council of any place may by their resolution declare that Greenwich, or any other time, shall be the time of the place"

"if a town council might determine the time, they might make a man born on a different day from that on which he was really born."

"Ten o'clock is 10 o'clock according to the time of the place, and the town council cannot say that it is not, but that it is 10 o'clock by Greenwich time. Neither can the time be altered by a railway company whose railway passes through the place, nor by any person who regulates the clock in the town-hall."

I couldn't resist some of these quotes from the judgement, in particular the second one.
(For non-lawyers, "C.B." means "Baron of the Court of Exchequer", a class of judge; Pollock was in fact the last judge to hold that title.)

My research found some assorted US cases from the period on the topic of local time, such as ones when the insurance expired at 12 noon and the building caught fire at 12:03 or 11:57 depending on which clock you use. These were decided differently - generally against the drafter of the contract, though over time the view swung from local to standard time.

Then there is R v Haddock (1971) BBC, heard before Mr. Justice Swallow.

Statutes (Definition of Time) Act 1880

43 & 44 Vict. c.9.

Whenever any expression of time occurs in any Act of Parliament, deed, or other legal instrument, the time referred shall, unless it is otherwise specifically stated, be held in the case of Great Britain to be Greenwich mean time, and in the case of Ireland, Dublin mean time.

So Parliament disagreed with Judge Pollock - they can make a man be born on a different day from that he was actually born on.

That Act has been repealed, but the Interpretation Act 1978 says effectively the same thing (apart from Ireland, which no longer observes Dublin mean time).

24 hours in a day
60 minutes in an hour
60 seconds in a minute

The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom.

Once upon a time we defined a second as a fraction of a day.

But now we have far more accurate methods than the sun, we define the second in terms of atomic phenomenon. This frequency is, by my calculations, a slightly flat C# 25 octaves above middle C.

Three statements

  1. There are 60 seconds in a minute.
  2. All seconds are the same length.
  3. Midnight is (on average) in the middle of the night.

You might think all three of these are obvious, but ...

UT1
(GMT)
TAIUTC
There are 60 seconds in a minute.
All seconds are the same length.
Midnight is (on average) in the middle of the night.

This turns out to be like the old joke: "quick, cheap, works ... pick any two".

The problem is that, now we have accurate atomic clocks, we can see that not only does the length of the day change on an annual basis, but the length of the mean day in different years is different. That means all three of the statements can't be true at once.

As a result, there are three common timescales in use. UT1 ("universal time" - the modern name for GMT) divides the mean day into 86400 seconds, but those seconds will vary in length as the length of the mean day changes. TAI ("international atomic time" - this abbreviation derives from French) uses constant seconds measured by an atomic clock, but that means that as the mean day gets longer and longer, 00:00 and the middle of the night drift away from each other. Finally UTC ("coordinated universal time") uses atomic seconds but adjusts the time to remain within a second of UT1. To do this means not all minutes are 60 seconds long.

Yes, there are UT0 and UT2 as well as UT1. UT0 is determined by observing the stars, UT1 corrects for polar motion (the north pole wanders in a circle about 5 metres in diameter in both annual and 435 day cycles, but is also drifting about 20 cm per year along the 80° west meridian), so has the same value everywhere, and UT2 corrects for annual and semi-annual variations. There are also UT1R and UT2R that have 62 other corrections with periods from 5.6 days to 18.6 years.

Leap seconds

UTC introduces "leap seconds" - the last minute of June or December (or if necessary March or September) can have 59, 60, or 61 seconds

Normally Negative leap Positive leap
23:59:5723:59:5723:59:57
23:59:5823:59:5823:59:58
23:59:5900:00:0023:59:59
00:00:0000:00:0123:59:60
00:00:0100:00:0200:00:00
00:00:0200:00:0300:00:01

When there is a leap second, the "pips" heard on the BBC contain 7 pips instead of the usual 6.

There have been 11 leap seconds at the end of June and 16 at the end of December. The March and September options haven't been needed so far.

So far every leap second has been a positive one.

Leap seconds

DUT1 = UT1 - UTC

The requirement is to keep |DUT1| < 0.9s and TAI - UTC a whole number.

  • DUT1 currently -0.3s
  • TAI-UTC currently 34s

For non-mathematicians, |...| means "ignore the sign", so |0.5| and |-0.5| are both 0.5.

Those numbers were correct when I gave this presentation back in 2011.

Today (March 2018) the figures are:

  • DUT1 currently +0.1s
  • TAI-UTC currently 37s
making a total change of 2.6s.

Positive leap seconds were inserted at the end of June 2012, June 2015, and December 2016.

Leap seconds

Announced with a few months warning

IERS announced the last positive leap second, in December 2008, on 4th July.

The next possibility, June 30th 2011, was only announced on 2nd February (no, there’s no leap).

IERS is the International Earth Rotation Service. I love this name - it produces the image of a secret group of people whose hard work keeps the earth turning.

The announcements are usually made every 6 months in the form of "Bulletin C" - available here.

The most recent announcement was on 9th January 2018 and said there will be no leap second at the end of June 2018.

DUT1

The graph shows the changes in DUT1 over the years. The diagonal slope is due to the slowing rotation of the earth (of which more later) while the vertical lines represent the leap seconds.

If the rotation started speeding up then the curve would slope upwards and, if needed, a negative leap second would be a vertical line downwards instead of upwards.

You can see that the rate of change in DUT1 has varied a lot.

What is legal time?

In (most of) the UK it is Greenwich Mean Time.
(or British Summer Time)

But in practice, everyone uses UTC, even the "Greenwich pips".

MSF transmits UTC, though there’s a hidden DUT1 as well.

We talk about Greenwich mean time, but Greenwich is moving due to tectonic action, altering the length of day according to the Greenwich meridian by by tens of microseconds per year. The poles are also moving relative to the surface of the earth. And the WGS84 Meridian (used by GPS devices) is 100 metres and thus 354 milliseconds east of the Greenwich one.

The Co-ordinated Universal Time Bill was introduced in 1997 to convert legal time to UTC, but it never got through Parliament because MPs were scared of being seen as "abolishing GMT".

MSF is the radio station that "radio-controlled" clocks use to determine the time. It was sited near Rugby from 1966 to 2007; since 1st April 2007 it transmits from Anthorn, Cumbria. It transmits the date, day of week, time, DUT1, whether BST is in effect, and a flag indicating that DUT starts or ends in the next hour. It does not indicate the presence of leap seconds. Its indication of DUT can only range from -0.9 to +0.9 seconds in units of 0.1s.

The EU is equally confused.
Directive 2000/84/EC (Summer Time)

BG:Гринуич
CS:GMT
DA:verdenstid (UTC)
DE:Weltzeit
EL:ώρα Γκρίνουιτς
EN:Greenwich Mean Time
ES:hora universal
ET:Greenwichi
FI:GMT
FR:temps universel
HU:greenwich-I
IT:ora universale
LT:GMT
LV:Grīnvičas
MT:Greenwich Mean Time
NL:wereldtijd
PL:uniwersalnego (GMT)
PT:tempo universal
RO:timp universal
SK:greenwichského
SL:univerzalnem koordinirane času (UTC)
SV:Greenwichtid (Greenwich Mean Time, GMT)

Directive 2000/84/EC states that, throughout the EU, the clocks go forward and back at the same moment (01:00 GMT) on the same day. This table shows the term used to indicate "GMT" in the versions published in each of the 22 official languages. Black indicates that the term includes the word "Greenwich", blue that it translates as "world time" or "universal time", and red as something else.

The languages in the left column are Bulgarian, Czech, Danish, German, Greek, English, Spanish, Estonian, Finnish, French, Hungarian, and Italian, while those in the right column are Lithuanian, Latvian, Maltese, Dutch, Polish, Portuguese, Romanian, Slovak, Slovenian, and Swedish.

These terms aren't always the legal time. Although the German version says "world time", legal time in Germany is UTC while in Austria it is GMT. And while the Danish version says UTC, legal time in Denmark is "solar time for 15° East".

Leap second triple whammy

  • Length of Day ≠ 86400 seconds
    • Currently 86400.0025
    • Requires leap seconds
  • Length of Day varies
    • Unpredictable leap seconds
  • Length of Day increasing
    • Currently increasing about 18µs/year
    • More and more leap seconds

The problems occur because the length of the day is misbehaving in three separate ways (the terms "double whammy" and "triple whammy" were popular at the time I wrote this talk).

And it turns out that the length of day varies for three separate reasons.

This graph shows the variation in length of day over about 40 years. The dotted vertical lines indicate when leap seconds happened and the red numbers identify some of them.

A careful examination will show that the area between any two dotted lines is about the same; it is this area that represents DUT.

This is often misunderstood. So long as LOD doesn’t average 86400 on a fairly short timescale, we need leap seconds. The cause is the accumulation of the difference over a period; a mathematician would say that the LOD error is integrated to cause DUT.

This graph is adapted from that at http://www.ucolick.org/~sla/leapsecs/.

All these variations are caused by changes in the earth's angular momentum. Angular momentum is the rate of rotation multiplied by moment of inertia and, very importantly, total angular momentum is preserved - it can't be created or destroyed and its value can't change. The moment of inertia is based on the mass of the rotating object, but biased against mass near the axis of rotation and towards mass on the outside.

The classic way to explain this is to consider a spinning ice-skater with their arms out. When they pull their arms in, that reduces the moment of inertia because the mass has moved towards the axis of rotation (a line from the skater's head to their feet). Because angular momentum can't change, the reduction in moment of inertia has to be compensated for by an increase in rate of rotation, so the skater spins faster.

(If angular momentum is preserved, how can the skater ever stop spinning? Or, for that matter, start spinning in the first place? The answer is that friction with the ice transfers the skater's angular momentum to the earth as a whole or back again. The earth is so massive and has such a great moment of inertia that we can't detect this happening.)

This short-term variation is mostly caused by earthquakes. They move bits of the earth's crust up and down, changing the moment of inertia and so the rate of rotation - increasing the rate when bits move down and reducing it when they move up.

This graph expands the scale out to about 280 years. On the right we see precise measurements of the length of day based on atomic clocks, while further back we're relying on astronomers with clocks of varying accuracy.

The dotted lines are "best fit" lines to the data based on various assumptions (we'll see more about this in a couple of slides time). They are measured in milliseconds per century (a century is about 3000 million seconds, so that's one part in 2000 million or so).

This mid-range variation is caused by glacial rebound. The ice ages resulted in huge amounts of ice sitting on top of the earth's crust, heavy enough to compress the crustal rocks. When that ice melted, the rocks sprung back up or, rather, are springing back up, because it's a very slow process. As they spring up, they increase the moment of inertia and so reduce the rate of rotation.

(It's true that the melting ice moved downhill as water and so reduced the moment of inertia, but firstly it happened about 12,000 years ago and secondly the mass of the water is much less.)

This last graph takes us back about 2500 years. Apart from the recent data, this is mostly derived from eclipse observations in historical records. The change in the speed of the earth's rotations affects the place that gets a solar eclipse but doesn't affect when it happens, so by looking at these records it's possible to figure out DUT (or, more precisely, the difference between UT and what UTC would have been if it existed back then) and thus the average length of day.

Each coloured stripe represents a half-hour difference, or 1800 missed leap seconds. Note that in the last 1000 years we're talking about one leap second a year on average, but in the previous 1000 it's 5, or a leap second every 2½ months!

The 1.4 ms/century figure is based on observations since 1620 while the 1.8 figure is the best fit to this graph. As for the 2.3 figure, that's based on how far away the moon is.

How did the moon get into this? Well, as we all know, the moon causes tides in the earth's oceans and, less obviously, in the rocks of the crust. The friction of the water and the crust being pulled up and down drags against the earth's rotation and slows it down, bit by bit. The resulting loss in angular momentum has to go somewhere (remember, you can't destroy angular momentum), and where it goes is making the moon move away from the earth (thus making it "higher", thus increasing its moment of inertia and so its angular momentum).

The effect is very small over a short period, but it can be measured by firing lasers at mirrors on the moon (the Apollo astronauts left some there for just this sort of thing) and using them to determine how far away it is. It turns out the moon is moving away from the earth at about 38 millimetres per year, allowing us to calculate the slowing of the earth's rotation.

Of course this isn't a new phenomenon. It's been going on for thousands and millions of years and, over that length of time, all those 38 mm add up. (If that rate was constant, it would be 38 km in a million years or 171,000 km - nearly half the distance to the moon - since the earth first formed. But more of that later.)

So let's look back further. Back to the time of the dinosaurs.

Oops, wrong T.rex.

T.rex, of course.

T.rex lived in the late Cretaceous period, about 65 million years ago, right at the end of the reign of the dinosaurs. At that point the length of day was 23 hours and 46 minutes, meaning 368.3 days in a year.

This is Apatosaurus. It dates from 150 million years ago, the late Jurassic. The length of day was 23 hours and 29 minutes, making 373.3 days in a year.

And this is Eoraptor, from the dawn of the dinosaurs: 230 million years ago, in the Carnian age of the late Triassic. Now the length of day is 23 hours and 12 minutes, so 377.6 days in a year.

620 Ma21h54m400.4 d/y
900 Ma20h48m421.6 d/y
2450 Ma18h48m466.6 d/y
4533 Ma 5h ?? 1800 d/y

Let's get way back beyond the dinosaurs. This little fellow is an Microdictyon. It may be an early Cambrian (from 520 to 541 million years ago) or an Ediacaran (from 600 to 541 million).

Looking further back, 620 million years ago is the start of multicellular life, 900 million years was a period called "snowball earth", an extreme ice age when glaciers covered the entire planet, and 2450 million is when oceanic cyanobacteria started more efficient photosynthesis, resulting in "the great oxygenation event" when the earth's atmosphere changed from none to about 5% oxygen.

Finally, 4533 million years ago is shortly after the earth's formation. At this time, current theories said, the earth collided with a Mars-sized body known as Theia; the moon is part of the wreckage from the collision.

As we can see, the further back we go the faster the earth spins.

If you're wondering how reliable these numbers are, there are a number of sources. For example, there are places where the tides have left fossils and, by counting tidemarks it's possible to determine how many days there were in a lunar month or in a year.

"If the world should stop revolving, spinning slowly down to die"

Now let's head in the other direction, towards the future, with the rotation slowing down.

(No, I didn't impose the music on my audience.)

Without leap seconds
what happens to DUT1?

2019:8 seconds
2063:1 minute
2198:5 minutes
2405:15 minutes
2616:30 minutes
2918:1 hour
3348:2 hours
3680:3 hours
4429:6 hours
5489:12 hours
6990:1 day
15426:1 week
30200:1 month

DUT is the difference between UT (the sun) and UTC (clocks). So in 4429 the sun will be highest around 18:00.

8 seconds is the shortest period of time I found in case law (a document had to be filed electronically by a certain date and was actually filed at 00:00:08 the next day).

This is a quadratic function. It takes 900 years to reach the first hour, but only 430 years to reach the second one, and 330 years to reach the third. It takes nearly 1700 years to reach 3 hours, less than 800 years to get from 3 to 6, and about 1000 years to get from 6 to 12.

With leap seconds

soon:annual leaps
2470:quarterly leaps
3687:monthly leaps
9771:weekly leaps

Leap seconds keep the sun in the right place in the sky, but do we want to deal with one every week?

Either way

"We're doomed"

The black part is the past; the red is the future. Around 2100 million years from now increased solar radiation means the oceans will boil, bringing an effective end to tidal friction and so slowing of the earth's rotation.

Problems with leap seconds

 

Lack of public awareness

I suspect almost none of my audience - who are mostly technically-minded - had a good idea of what leap seconds are and many had probably never heard of them before this talk.

The general public are much worse in this respect. If few people know about them, there's little interest in dealing with the problems.

Modifying software to handle leap seconds in data is significant work (how much code has "seconds * 60" in it?) for little gain. Justifying the effort and cost to management can be hard ("it's only a second").

Problems with leap seconds

 

Lack of predictability or long-term warning.

This is the biggest problem.

Leap seconds can't be predicted so, unlike leap years or Y2K, you can't plan for them.

Even if you have everything developed, you can't leave it to run itself (again, unlike leap years). Instead you need to make sure that there's a table of leap seconds in your software and that you keep it up to date. We're starting to see mechanisms for doing that for devices with a good Internet connection, but there are other situations where this isn't so easy (for example, cold standby devices in isolated locations).

Problems with leap seconds

What does "add 24 hours" mean?

  • Do we add 1 to the day?
  • Or do we add 86400 seconds?

What happens if we don't have leap seconds and DUT reaches a day? Do we stick a leap day into either UT or UTC to being the dates in line, or do we just say that they're 86400 seconds (24 days) apart?

The proposal I like best is the "leap hour" one: abolish leap seconds, but when DUT reaches around an hour, countries move their time zone by an hour.

So, for example, the UK would shift to UTC+1 in the winter and UTC+2 in the summer, western Europe to UTC+2/UTC+3, and so on. This would be most easily done by simply omitting one of the autumn shift backs. After five such shifts, the place that is on UTC is now Greenwich New York rather than Greenwich London.

This doesn't require world-wide coordination; each country can do it when it likes, just like each country controls the summer time shift for itself. The only problem is that the offset from UTC grows without limit; eventually we will be on offsets like UTC+74.

Problems with leap seconds

POSIX ignores them
(sort of)

so does Network Time Protocol

and therefore so do most operating systems

POSIX defines time in terms of "seconds past the epoch". This in turn is defined in terms of a formula of the form date*86400 + hours*360 + minutes*60 + seconds. This means that, while you can include 23:59:60 in a timestamp, it will be treated as 00:00:00 of the next day.

NTP servers tend to either be wrong over a leap second or to just repeat the leap second. Since NTP "steers" computers using it rather than jumping the clock when it disagrees, it will take a while to get back to the correct time.

This means that if you need to have accurate timing, you need to avoid all the operating system facilities and "roll your own".

Problems with leap seconds

Hard to test code that applies them.

One test run every year and a half?!

Even if you do have a plan for dealing with leap seconds in your code, you don't know when you can test it out for real. Testing on isolated systems can be done, but not on a whole network that's working 24/7/366.

The financial markets now work in milliseconds. Leap seconds might be in the middle of the night in the UK, but elsewhere they sometimes happen in trading hours (a 30th June leap second happens at 5pm in San Francisco and 10am in Tokyo).

Queries to financial markets some years ago, for example, showed that none of them had a public statement on what happens to trading over a leap second. Will transaction time stamps be handled properly? Will traders' computer system get upset if handled a (local time) timestamp of 16:59:60?

Enter ITU-T

  • Let’s abolish leap seconds.
  • UTC becomes TAI-34 (or whatever).
  • DUT1 grows without limit.

Programmers

Astronomers

No more hasslesStars all in the wrong place.
Much assumes |DUT| < 1.

ITU-T are part of the International Telecommunications Union. In 2011 they were suggesting abolishing leap seconds. It's not clear what the current state of the proposal is: the ITU study committee split 8-3 (the UK was one of the countries that voted against) so sent it to the Jan 2012 plenary, which requires a 70% vote to pass it.

The leap hour proposal seems to have died.

Abolishing leap seconds means we're back to the fact that, in a few thousand years time, midnight will happen in daylight. Okay, it's a long way ahead, but the Easter algorithm works for millions of years, so perhaps our time algorithms should as well.

It's not just the stars that are the problem. What if only some countries adopt the proposal? Do ITU own the definition of UTC in practice (even if they invented it)? Does a positive decision affect the countries that currently use UTC in law? Should the new no-leap-seconds standard be called something else? "TI" has been suggested.

Other options include various approaches to regularizing leap seconds. For example, we know the approximate rate they occur at; we can be fairly sure there will be about 20 in the next 20 years. So let's fix the rule at one per year in 2020 to 2039 inclusive, then use the experience we've gained to set a new rate for 2040 to 2059, and so on. The problem with this is that DUT1 could get outside the 0.9 second limit, which would break (for example) the MSF radio transmissions.

In the last few years, well after I gave this talk, a scheme that is gaining popularity (possibly because Google use it) is to "smear" the leap second - the computer's clock is run slightly slowly for a period either side of the leap second, so that (say) the 1201 seconds from 23:50:00 to 00:10:00 take 1200 seconds on the computer's clock. This, of course, breaks the "all seconds are the same length" requirement. (Thanks to Steve Summit for reminding me of this.)

Turf wars

In 2009 a bureaucratic turf war started, with CGPM claiming that they should decide what timescales are and ITU-R should be limited to controlling radio time signals. At the time I gave this talk it seemed to be arguments about who is allowed to publish documents saying what. In late 2011 the CGPM was in internal dispute and so ITU was winning.

Questions for lawyers

If no clocks show GMT, what is legal time?

If the UK is on GMT and the USA is on UTC, what happens to international financial trades?

Do your contracts actually specify the time system to use?

What about Martian time?

No, the Martian time comment isn't a joke.

One member of the audience saw this slide and said out loud "We're going to need 'Choice of Time' clauses in contracts to go with the 'Choice of Law' ones".

Links

These sources and other interesting links would be too small to read on the slide, so I've put them over here. These are the original links.

http://www.agi.com/downloads/resources/user-resources/downloads/whitepapers/DebateOverUTCandLeapSeconds.pdf [moved]
http://www.atnf.csiro.au/iau-comm31/activities.php
http://www.bipm.org/cc/CCTF/Allowed/18/CCTF_09-32_noteUTC.pdf
http://www.eos.ubc.ca/~mjelline/453website/eosc453/E_prints/1999RG900016.pdf
http://www.iers.org
http://www.leapsecond.com/history/1968-Metrologia-v4-n4-Essen.pdf
http://www.uakron.edu/law/lawreview/v36/docs/parrish36.1.pdf [moved]
http://www.ucolick.org/~sla/leapsecs/
http://www.whatdotheyknow.com/request/uk_policy_on_leap_seconds

The two suffixed with "[moved]" have since moved to new locations:

http://www.agi.com/resources/white-papers/the-debate-over-utc-and-leap-seconds.pdf
http://ideaexchange.uakron.edu/cgi/viewcontent.cgi?article=1362&context=akronlawreview
"May Week is in June"
"I'm confused"
"So was the Tardis"

(The words were animated on the original slideshow.)

How could I resist a Doctor Who finish?


Back Back to the presentations index. CDWF Back to Clive's home page.