Leap second


A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time, to accommodate the difference between precise time and imprecise observed solar time. The UTC time standard, widely used for international timekeeping and as the reference for civil time in most countries, uses precise atomic time and consequently would run ahead of observed solar time unless it is reset to UT1 as needed. The leap second facility exists to provide this adjustment.
Because the Earth's rotation speed varies in response to climatic and geological events, UTC leap seconds are irregularly spaced and unpredictable. Insertion of each UTC leap second is usually decided about six months in advance by the International Earth Rotation and Reference Systems Service, to ensure that the difference between the UTC and UT1 readings will never exceed 0.9 seconds.
This practice has proved disruptive, particularly in the twenty-first century and especially in services that depend on precise time stamping or time-critical process control. The relevant international standards body has been debating whether or not to continue the practice, with an increasing number of nations supporting its abolition.

History

About 140 AD, Ptolemy, the Alexandrian astronomer, sexagesimally subdivided both the mean solar day and the true solar day to at least six places after the sexagesimal point, and he used simple fractions of both the equinoctial hour and the seasonal hour, none of which resemble the modern second. Muslim scholars, including al-Biruni in 1000, subdivided the mean solar day into 24 equinoctial hours, each of which was subdivided sexagesimally, that is into the units of minute, second, third, fourth and fifth, creating the modern second as of the mean solar day in the process. With this definition, the second was proposed in 1874 as the base unit of time in the CGS system of units. Soon afterwards Simon Newcomb and others discovered that Earth's rotation period varied irregularly, so in 1952, the International Astronomical Union defined the second as a fraction of the sidereal year. In 1955, considering the tropical year to be more fundamental than the sidereal year, the IAU redefined the second as the fraction of the 1900.0 mean tropical year. In 1956, a slightly more precise value of was adopted for the definition of the second by the International Committee for Weights and Measures, and in 1960 by the General Conference on Weights and Measures, becoming a part of the International System of Units.
Eventually, this definition too was found to be inadequate for precise time measurements, so in 1967, the SI second was again redefined as 9,192,631,770 periods of the radiation emitted by a caesium-133 atom in the transition between the two hyperfine levels of its ground state. That value agreed to 1 part in 1010 with the astronomical second then in use. It was also close to of the mean solar day as averaged between years 1750 and 1892.
However, for the past several centuries, the length of the mean solar day has been increasing by about 1.4–1.7 ms per century, depending on the averaging time. By 1961, the mean solar day was already a millisecond or two longer than SI seconds. Therefore, time standards that change the date after precisely SI seconds, such as the International Atomic Time, will get increasingly ahead of time standards tied to the mean solar day, such as Universal Time.
When the Coordinated Universal Time standard was instituted in 1960, based on atomic clocks, it was felt necessary to maintain agreement with the GMT time of day, which, until then, had been the reference for broadcast time services. From 1960 to 1971, the rate of UTC atomic clocks was slowed by the BIH to remain synchronized with UT2, a practice known as the "rubber second". The rate of UTC was decided at the start of each year, and was slower than the rate of atomic time by −150 parts per 10 for 1960–1962, by −130 parts per 10 for 1962–63, by −150 parts per 10 again for 1964–65, and by −300 parts per 10 for 1966–1971. Alongside the shift in rate, an occasional 0.1 s step was needed. This predominately frequency shifted rate of UTC was broadcast by MSF, WWV, and CHU among other time stations. In 1966, the CCIR approved "stepped atomic time", which adjusted atomic time with more frequent 0.2 s adjustments to keep it within 0.1 s of UT2, because it had no rate adjustments. SAT was broadcast by WWVB among other time stations.
In 1972, the leap-second system was introduced so that the UTC seconds could be set exactly equal to the standard SI second, while still maintaining the UTC time of day and changes of UTC date synchronized with those of UT1. By then, the UTC clock was already 10 seconds behind TAI, which had been synchronized with UT1 in 1958, but had been counting true SI seconds since then. After 1972, both clocks have been ticking in SI seconds, so the difference between their displays at any time is 10 seconds plus the total number of leap seconds that have been applied to UTC as of that time;, 27 leap seconds have been applied to UTC, so the difference is 10 + 27 = 37 seconds.

Insertion of leap seconds

The scheduling of leap seconds was initially delegated to the Bureau International de l'Heure, but passed to the International Earth Rotation and Reference Systems Service on January 1, 1988. IERS usually decides to apply a leap second whenever the difference between UTC and UT1 approaches 0.6 s, in order to keep the difference between UTC and UT1 from exceeding
The UTC standard allows leap seconds to be applied at the end of any UTC month, with first preference to June and December and second preference to March and September., all of them have been inserted at the end of either June 30 or December 31. IERS publishes announcements every six months, whether leap seconds are to occur or not, in . Such announcements are typically published well in advance of each possible leap second date – usually in early January for June 30 and in early July for December 31. Some time signal broadcasts give voice announcements of an impending leap second.
Between 1972 and 2020, a leap second has been inserted about every 21 months, on average. However, the spacing is quite irregular and apparently increasing: there were no leap seconds in the six-year interval between January 1, 1999 and December 31, 2004, but there were nine leap seconds in the eight years 1972–1979.
Unlike leap days, which begin after February 28 23:59:59 local time, UTC leap seconds occur simultaneously worldwide; for example, the leap second on December 31, 2005 23:59:60 UTC was December 31, 2005 18:59:60 in U.S. Eastern Standard Time and January 1, 2006 08:59:60 in Japan Standard Time.

Process

When it is mandated, a positive leap second is inserted between second 23:59:59 of a chosen UTC calendar date and second 00:00:00 of the following date. The definition of UTC states that the last day of December and June are preferred, with the last day of March or September as second preference, and the last day of any other month as third preference. All leap seconds have been scheduled for either June 30 or December 31. The extra second is displayed on UTC clocks as 23:59:60. On clocks that display local time tied to UTC, the leap second may be inserted at the end of some other hour, depending on the local time zone. A negative leap second would suppress second 23:59:59 of the last day of a chosen month, so that second 23:59:58 of that date would be followed immediately by second 00:00:00 of the following date. Since the introduction of leap seconds, the mean solar day has outpaced atomic time only for very brief periods, and has not triggered a negative leap second.

Slowing rotation of the Earth

Leap seconds are irregularly spaced because the Earth's rotation speed changes irregularly. Indeed, the Earth's rotation is quite unpredictable in the long term, which explains why leap seconds are announced only six months in advance.
A mathematical model of the variations in the length of the solar day was developed by F. R. Stephenson and L. V. Morrison, based on records of eclipses for the period 700 BC to 1623 AD, telescopic observations of occultations for the period 1623 until 1967 and atomic clocks thereafter. The model shows a steady increase of the mean solar day by per century, plus a periodic shift of about 4 ms amplitude and period of about 1,500 yr. Over the last few centuries, rate of lengthening of the mean solar day has been about per century, being the sum of the periodic component and the overall rate.
The main reason for the slowing down of the Earth's rotation is tidal friction, which alone would lengthen the day by 2.3 ms/century. Other contributing factors are the movement of the Earth's crust relative to its core, changes in mantle convection, and any other events or processes that cause a significant redistribution of mass. These processes change the Earth's moment of inertia, affecting the rate of rotation due to conservation of angular momentum. Some of these redistributions increase Earth's rotational speed, shorten the solar day and oppose tidal friction. For example, glacial rebound shortens the solar day by 0.6 ms/century and the 2004 Indian Ocean earthquake is thought to have shortened it by 2.68 microseconds. It is evident from the figure that the Earth's rotation has slowed at a decreasing rate since the initiation of the current system in 1971, and the rate of leap second insertions has therefore been decreasing.

Future of leap seconds

The TAI and UT1 time scales are precisely defined, the former by atomic clocks and the latter by astronomical observations. UTC is a compromise, stepping with atomic seconds but periodically reset by a leap second to match UT1.
The irregularity and unpredictability of UTC leap seconds is problematic for several areas, especially computing. With increasing requirements for accuracy in automation systems and high-speed trading, this raises a number of issues, since a leap second represents a jump as much as a million times larger than the accuracy required for industry clocks. Consequently, the long-standing practice of inserting leap seconds is under review by the relevant international standards body.

International proposals for elimination of leap seconds

On July 5, 2005, the Head of the Earth Orientation Center of the IERS sent a notice to IERS Bulletins C and D subscribers, soliciting comments on a U.S. proposal before the ITU-R Study Group 7's WP7-A to eliminate leap seconds from the UTC broadcast standard before 2008. It was expected to be considered in November 2005, but the discussion has since been postponed. Under the proposal, leap seconds would be technically replaced by leap hours as an attempt to satisfy the legal requirements of several ITU-R member nations that civil time be astronomically tied to the Sun.
A number of objections to the proposal have been raised. Dr. P. Kenneth Seidelmann, editor of the Explanatory Supplement to the Astronomical Almanac, wrote a letter lamenting the lack of consistent public information about the proposal and adequate justification. Steve Allen of the University of California, Santa Cruz cited what he claimed to be the large impact on astronomers in a Science News article. He has an extensive online site devoted to the issues and the history of leap seconds, including a set of references about the proposal and arguments against it.
At the 2014 General Assembly of the International Union of Radio Scientists, Dr. Demetrios Matsakis, the United States Naval Observatory's Chief Scientist for Time Services, presented the reasoning in favor of the redefinition and rebuttals to the arguments made against it. He stressed the practical inability of software programmers to allow for the fact that leap seconds make time appear to go backwards, particularly when most of them do not even know that leap seconds exist. The possibility of leap seconds being a hazard to navigation was presented, as well as the observed effects on commerce.
The United States formulated its position on this matter based upon the advice of the National Telecommunications and Information Administration and the Federal Communications Commission, which solicited comments from the general public. This position is in favor of the redefinition.
In 2011, Chunhao Han of the Beijing Global Information Center of Application and Exploration said China had not decided what its vote would be in January 2012, but some Chinese scholars consider it important to maintain a link between civil and astronomical time due to Chinese tradition. The 2012 vote was ultimately deferred. At an ITU/BIPM-sponsored workshop on the leap second, Dr. Han expressed his personal view in favor of abolishing the leap second, and similar support for the redefinition was again expressed by Dr. Han, along with other Chinese timekeeping scientists, at the URSI General Assembly in 2014.
At a special session of the Asia-Pacific Telecommunity Meeting on February 10, 2015, Chunhao Han indicated China was now supporting the elimination of future leap seconds, as were all the other presenting national representatives. At this meeting, Bruce Warrington and Tsukasa Iwama indicated particular concern for the financial markets due to the leap second occurring in the middle of a workday in their part of the world. Subsequent to the CPM15-2 meeting in March/April 2015 the draft gives four methods which the WRC-15 might use to satisfy Resolution 653 from WRC-12.
Arguments against the proposal include the unknown expense of such a major change and the fact that universal time will no longer correspond to mean solar time. It is also answered that two timescales that do not follow leap seconds are already available, International Atomic Time and Global Positioning System time. Computers, for example, could use these and convert to UTC or local civil time as necessary for output. Inexpensive GPS timing receivers are readily available, and the satellite broadcasts include the necessary information to convert GPS time to UTC. It is also easy to convert GPS time to TAI, as TAI is always exactly 19 seconds ahead of GPS time. Examples of systems based on GPS time include the CDMA digital cellular systems IS-95 and CDMA2000. In general, computer systems use UTC and synchronize their clocks using Network Time Protocol. Systems that cannot tolerate disruptions caused by leap seconds can base their time on TAI and use Precision Time Protocol. However, the BIPM has pointed out that this proliferation of timescales leads to confusion.
At the 47th meeting of the Civil Global Positioning System Service Interface Committee in Fort Worth, Texas in September 2007, it was announced that a mailed vote would go out on stopping leap seconds. The plan for the vote was:
In January 2012, rather than decide yes or no per this plan, the ITU decided to postpone a decision on leap seconds to the World Radiocommunication Conference in November 2015. At this conference, it was again decided to continue using leap seconds, pending further study and consideration at the next conference in 2023.
In October 2014, Dr. Włodzimierz Lewandowski, chair of the timing subcommittee of the Civil GPS Interface Service Committee and a member of the ESA Navigation Program Board, presented a CGSIC-endorsed resolution to the ITU that supported the redefinition and described leap seconds as a "hazard to navigation".
Some of the objections to the proposed change have been answered by its opponents. For example, Dr. Felicitas Arias, who, as Director of the International Bureau of Weights and Measures 's Time, Frequency, and Gravimetry Department, is responsible for generating UTC, noted in a press release that the drift of about one minute every 60–90 years could be compared to the 16-minute annual variation between true solar time and mean solar time, the one hour offset by use of daylight time, and the several-hours offset in certain geographically extra-large time zones.

Issues created by insertion (or removal) of leap seconds

Calculation of time differences and sequence of events

To compute the elapsed time in seconds between two given UTC dates requires the consultation of a table of leap seconds, which needs to be updated whenever a new leap second is announced. Since leap seconds are known only 6 months in advance, time intervals for UTC dates farther in the future cannot be computed.

Missing leap seconds announcement

Although BIPM announces a leap second 6 months in advance, most time distribution systems announce leap seconds at most 12 hours in advance, sometimes only in the last minute and some even not at all. Clocks that are not regularly synchronized can miss a leap second, but still can claim to be perfectly synchronized.

Implementation differences

Not all clocks implement leap seconds in the same manner. Leap seconds in Unix time are commonly implemented by repeating 23:59:59 or adding 23:59:60. Network Time Protocol freezes time during the leap second, some time servers declare "alarm condition". Other schemes smear time in the vicinity of a leap second.

Binary representation of the leap second

While the textual representation of leap seconds is defined by BIPM as "23:59:60", most computer operating systems and most time distribution systems derive this human-readable text from a binary counter indicating the number of seconds elapsed since an arbitrary epoch; for instance, since 00:00:00 in Unix machines or since 00:00:00 in NTP. This counter has no indicator that a leap second has been inserted, therefore two seconds in sequence will have the same counter value. Some computer operating systems, in particular Linux, assign to the leap second the counter value of the preceding, 23:59:59 second, while other computers assign to the leap second the counter value of the next, 00:00:00 second. Since there is no standard governing this sequence, the time stamp of values sampled at exactly the same time can vary by one second. This may explain flaws in time-critical systems that rely on time-stamped values.

Textual representation of the leap second

The textual representation is not always accepted. Entering "2016-12-31 23:59:60" in a POSIX converter will fail and XML will reject such entry as "invalid time". This can cause an exception status in application programs.

Other reported software problems associated with the leap second

A number of organizations reported problems caused by flawed software following the June 30, 2012, leap second. Among the sites which reported problems were Reddit, Mozilla, Qantas, and various sites running Linux.
Older versions of Motorola Oncore VP, UT, GT, and M12 GPS receivers had a software bug that would cause a single timestamp to be off by a day if no leap second was scheduled for 256 weeks. On November 28, 2003, this happened. At midnight, the receivers with this firmware reported November 29, 2003 for one second and then reverted to November 28, 2003.
Older Trimble GPS receivers had a software flaw that would insert a leap second immediately after the GPS constellation started broadcasting the next leap second insertion time, rather than waiting for the next leap second to happen. This left the receiver's time off by a second in the interim.
Older Datum Tymeserve 2100 GPS receivers and Symmetricom Tymeserve 2100 receivers also have a similar flaw to that of the older Trimble GPS receivers, with the time being off by one second. The advance announcement of the leap second is applied as soon as the message is received, instead of waiting for the correct date. A workaround has been described and tested, but if the GPS system rebroadcasts the announcement, or the unit is powered off, the problem will occur again.
On January 21, 2015, several models of GPS receivers implemented the leap second as soon as the announcement was broadcast by GPS, instead of waiting until the implementation date of June 30.
The NTP protocol specifies a flag to inform the receiver that a leap second is imminent. However, some NTP servers have failed to set their leap second flag correctly. Some NTP servers have responded with the wrong time for up to a day after a leap second insertion.
Four different brands of marketed navigational receivers that use data from GPS or Galileo along with the Chinese BeiDou satellites, and even some receivers that use BeiDou satellites alone, were found to implement leap seconds one day early. This was traced to the fact that BeiDou numbers the days of the week from 0 to 6, while GPS and Galileo number them from 1 to 7.
The effect of leap seconds on the commercial sector has been described as "a nightmare". Because financial markets are vulnerable to both technical and legal leap second problems, the Intercontinental Exchange, parent body to 7 clearing houses and 11 stock exchanges including the New York Stock Exchange, ceased operations for 61 minutes at the time of the June 30, 2015 leap second.
Despite the publicity given to the 2015 leap second, a small number of network failures occurred due to leap second-related software errors of some routers. Also, interruptions of around 40 minutes' duration occurred with Twitter, Instagram, Pinterest, Netflix, Amazon, and Apple's music streaming series Beats 1.
Several older versions of the Cisco Systems NEXUS 5000 Series Operating System NX-OS are affected by leap second bugs.
Leap second software bugs have affected the Altea airlines reservation system used by Qantas and Virgin Australia.
Cloudflare was affected by a leap second software bug. Its DNS resolver implementation incorrectly calculated a negative number when subtracting two timestamps obtained from the Go programming language's time.Now function, which then used only a real-time clock source. This could have been avoided by using a monotonic clock source, which has since been added to Go 1.9.
There were misplaced concerns that farming equipment using GPS during harvests occurring on December 31, 2016, would be affected by the 2016 leap second. GPS navigation makes use of GPS time, which is not impacted by the leap second.

Workarounds for leap second problems

The most obvious workaround is to use the TAI scale for all operational purposes and convert to UTC for human-readable text. UTC can always be derived from TAI with a suitable table of leap seconds; the reverse is unsure. The Society of Motion Picture and Television Engineers video/audio industry standards body selected TAI for deriving time stamps of media.
IEC/IEEE 60802 specifies TAI for all operations. Grid automation is planning to switch to TAI for global distribution of events in electrical grids. Bluetooth mesh networking also
uses TAI.
Instead of inserting a leap second at the end of the day, Google servers implement a "leap smear", extending seconds slightly over a 24-hour period centered on the leap second. Amazon followed a similar, but slightly different, pattern for the introduction of the June 30, 2015 leap second, leading to another case of the proliferation of timescales. They later released an NTP service for EC2 instances which performs leap smearing. UTC-SLS was proposed as a version of UTC with linear leap smearing, but it never became standard.
It has been proposed that media clients using the Real-time Transport Protocol inhibit generation or use of NTP timestamps during the leap second and the second preceding it.
NIST has established a special NTP time server to deliver UT1 instead of UTC. Such a server would be particularly useful in the event the ITU resolution passes and leap seconds are no longer inserted. Those astronomical observatories and other users that require UT1 could run off UT1 – although in many cases these users already download UT1-UTC from the IERS, and apply corrections in software.