At the third stroke the time will be twenty-three fifty-nine and sixty seconds

Wednesday February 05 2014 - , ,

Believe it or not, the time is occasionally 23:59:60. It seems wrong, “you can never have 61 seconds in a minute!” I hear you cry, but it is true! Read on to find out why.

As an astronomer, I tend to think about time more than most. When you say ‘what time is it’ you might expect a simple answer, but if you ask an astronomer, you might get a response along the lines of ‘in what timescale?’ or ‘relative to what?’. Time is much more complicated and slippery than most people would ever imagine and much of astronomy is concerned with its definition and measurement. This article is not by any means a complete history or analysis of the entire endeavour of measuring time, but I shall try to give a flavour of some of the things that a developer writing astronomy software needs to think about.

MP900408962[1]In times of old, the best measurement of time was probably the noonday sun, when shadows cast by sticks would be at their longest. From noon one day to noon the next is always about the same time, 24 hours as we know it today and there were 365 of these equal length days in every year and that was good enough for all practical purposes. Even to the modern day, civil time is related to the mean position of the noon sun at Greenwich, although it is no longer measured that way as we shall see.

This deceptively simple way of measuring the passage of time eventually began to cause problems though, because the length of a day is not exactly 24 hours and the length of a year is not exactly 365 days. The errors would mount up and the seasons (equinoxes and solstices) would slowly get out of step with the calendar!

MP900302968[1]The early Roman calendar consisted of 355 days and it required the occasional addition or removal of several days to keep it in step with the seasons. The Emperor Julius Ceasar, in the year 45 BCE (before common era) consulted with an Alexandrian astronomer named Sosigenes and they devices the Julian calendar, which was based on Earth’s revolutions around the Sun. Ceaser used a regular year of 365 divided into 12 months with a leap day added to February every 4 years. This approximation was quite good and was used for over 1,500 years but the leap years were slightly over-compensating and introduced an error of about 1 full day every 128 years. Over 1500 years, that adds up to a lot of days (about 10 days, in fact).

In 1582, Pope Gregory XIII was concerned that, according to the calendar, Easter was in the wrong place. It should fall fall upon the first Sunday after the first full moon on or after the Vernal Equinox, so Gregory declared that a new calendar would be used, which had a new more accurate rule for ‘leap years’. There would be one extra day in February every 4 years (when the year was divisible by 4) but not when it was divisible by 100, unless it was also divisible by 400. This simple and elegant system would last for many thousands of years without too much error, but to bring the seasons back into step with observed solar time and to correct the accumulated error of the Julian calendar, Pope Gregory XIII decreed that the day following Thursday, October 4, 1582 would be Friday, October 15, 1582, thus deleting 10 days and bringing the calendar back into step with the equinoxes and solstices and putting Easter back to the expected place on the calendar. Some people thought they had been robbed of 10 days from their lives and rioting ensued! However, the Gregorian calendar won the day and it is the calendar we still use today in most parts of the world.

Already, this raises questions when trying to do arithmetic with dates and times. When computing the difference between two Gregorian dates, one has to take into account of the number of leap years, and when converting between Julian and Gregorian dates, one has to remember the 10 missing days from October 1582!

The Julian calendar assumed 365.25 and the Gregorian calendar year is (on average) 365.2425 which is pretty close, within 1 part per million, of our current mean tropical year of 365.24219 days. I say ‘current’ because, as if things are not complicated enough, Earth is a dynamic system with a liquid core and plate tectonics, it has a large Moon and tidal oceans and it is a member of a solar system with complex gravitational interaction between the various other planets and the Sun, all of which conspire to make for an irregular and unpredictable spin and orbit around the Sun. Therefore, even if perfect measurement of the seasons and mean solar time were possible, they would not stay the same length for very long. The variations are only small and would probably not be noticed by most civil time-keepers, but they are real and is some branches of science they need to be taken into account.

Greenwich Mean Time (GMT) was originally based on measurements of the Sun, but in practice those measurements are difficult to make with enough accuracy. GMT has a number of successors including UT0, UT1, UT1R, UT2 and UT2R which are all computed using observations of distant quasars, laser ranging of the moon and other factors. The most interesting of these, for most astronomers, is UT1 which is now the principle form of Universal Time and the modern equivalent of Greenwich Mean Solar Time. Note that UT1 is still an observational measure of time, based on observations of quasars and specifically the International Celestial Reference Frame (ICRF).

File:FOCS-1.jpgSo far, we’ve dealt with observational time – that is, someone makes an observation and sets some sort of clock by it. Up to a point, this is all well and good, but such timescales are inherently inaccurate. Some of the reasons for the inaccuracies have already been discussed. In order to make predictions and compute things accurately, astronomers need an accurate, uniform timescale to work from. In about 1955, physicists began to experiment with atomic clocks, with various improvements until The SI second was defined in terms of the caesium atom in 1967 and then in 1971 this was used to define a timescale known as Temps atomique international (International Atomic Time, abbreviated TAI). This provides the accurate, regular timekeeping needed by modern physicists and astronomers that does not depend on any external influences for its accuracy. It is actually an average of the time kept by over 200 atomic clocks in over 50 national laboratories worldwide. So for the first time in history, here we have a time reference that will be steady as long as the laws of physics hold true. TAI is used in many applications (where accuracy to a millisecond is sufficient) to derive the value of Terrestrial Time (TT) as TAI + 32.184 seconds. TT is used when computing the positions of planets and other bodies as viewed from Earth and as such is a very useful unit for astronomers and astrometric software. TT differs from UT1 by an amount known as delta-T, which essentially represents the irregularity of UT1 and changes by a few milliseconds a year.

TAI is arranged such that it approximates UT1 which, as you will recall, is an observational measurement. UT1 therefore varies with respect to TAI in a way that is irregular and unpredictable. Neither of these timescales seem ideal for civil timekeeping. On the one hand we have the very precise and regular TAI which is slowly drifting away from Mean Solar Time; on the other we have UT1 which accurately reflects solar time but is irregular and difficult to use for computation. Another timescale is needed, which offers the precision of TAI but better reflects solar time.

So we come finally to UTC, Coordinated Universal Time, which is derived from TAI and many will recognise as the basis for all modern civil time keeping. UTC ‘ticks’ in S.I. seconds in step with TAI. By international convention, UTC is kept to within 0.9 seconds of UT1 so that it accurately reflects solar time, yet takes TAI as its timing reference.

Nearly all UTC days contain exactly 86,400 SI seconds, with exactly 60 seconds in each minute. However, because UT1 slowly drifts away from TAI, occasionally the last minute of a UTC day is adjusted to have 61  or 59 seconds by adding or subtracting a ‘leap second’. UTC was synchronised to TAI in January 1972 whereupon UTC

Leap seconds so far have always been positive, the day having an extra second, though they can be negative in theory. Leap seconds are generally applied at 23:59:59 on the last day of a month, usually June or December. The last such application was (at the time of writing) on June 30th 2012, where the time reached 23:59:60 before finally rolling over to midnight, as shown by this screen snip from Wikipedia:

File:Leap Second - June 30, 2012.png

So you see, although it doesn’t happen often, it is possible for there to be 61 seconds in a minute and for the time to reach 23:59:60! All these different timescales, some of which are discontinuous, make for a very complicated situation when trying to make computations and it is important to be very clear at all times as to which timescale is being used. It is something I am about to tackle for my Object Oriented Astronomy project. Wish me luck!