app28 Leap Seconds and Leap Years Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com Introduction Why Have Leap Seconds ? Leap seconds keep the atomic clock based International Time Scale, UTC (Universal Time Coordinated), in agreement with earth time based on the rate of rotation of the earth as determined by astronomical observations, to within 0.9 of a second. Leap seconds keep the two time scales in agreement and compensate for the decreasing rotational rate of the earth, which is slowly decreasing by approximately 1.4 milliseconds per century. This decrease in the Earth’s rotational rate is due to effects such as tidal braking. Atomic clock based time scales are much more stable than the daily rotational rate of the earth, therefore to keep the two synchronized, leap seconds are added (or subtracted, although because the rate of rotation is decreasing, in practice leap seconds are only added to compensate). Whether or not a leap second is added is determined by the International Earth Rotation and Reference Systems Service. The last leap second was added on June 30, 2012. The organization responsible for measuring the relationship between UTC (Coordinated Universal Time) and the rate of Earth’s rotation (the International Earth Rotation and Reference Systems Service - IERS), decides whether or not a leap second should be added to UTC to keep UTC in line with IERS. If required, leap seconds can be added either on June 30, or December 31 of the year in which the leap second is to be applied. IERS determines which date is more appropriate. The table below shows when leap seconds have been added, since their introduction in 1972. June December December December June December June June 30, 2012 31, 2008 31, 2005 31, 1998 30, 1997 31, 1995 30, 1994 30, 1993 June December December December June June June June 30, 1992 31, 1990 31, 1989 31, 1987 30, 1985 30, 1983 30, 1982 30, 1981 December December December December December December December December 31, 1979 31, 1978 31, 1977 31, 1976 31, 1975 31, 1974 31, 1973 31, 1972 In 2012 a leap second was added on June 30. Adding a leap second increases the length of the last minute of the last UTC day in the year to 61 seconds. The sequence of dates of the UTC second markers was: Normal Transition 2012 June 29 23h 59m 58s 2012 June 29 23h 59m 59s 2012 June 30 0h 0m 0s Leap Second Transition 2012 June 30 23h 59m 59s 2012 June 30 23h 59m 60s <<< 2012 July 1 0h 0m 0s Normal Transition 2012 July 1 23h 59m 58s 2012 July 1 23h 59m 59s 2012 June 2 0h 0m 0s For clarity the transitions on the day before and day after have also been shown. Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com Also, an interesting point to note is that although leap seconds are added, a clock with the leap second added versus a clock without the leap second added will be 1 second behind, slightly counter intuitive. See below: Clock With Leap Second Added 2012 June 29 23h 59m 58s 2012 June 29 23h 59m 59s 2012 June 29 23h 59m 60s << leap second added 2012 June 30 0h 0m 0s 2012 June 30 0h 0m 1s 2012 June 30 0h 0m 2s 2012 June 30 0h 0m 3s Clock without Leap second added 2012 June 29 23h 59m 58s 2012 June 29 23h 59m 59s 2012 June 30 0h 0m 0s 2012 June 30 0h 0m 1s 2012 June 30 0h 0m 2s 2012 June 30 0h 0m 3s 2012 June 30 0h 0m 4s Leap Seconds and NTP. NTP (Network Time Protocol) is always referenced directly to UTC. UTC commenced at 00:00 hours on January 1, 1972. At that time it was determined to set the NTP second to a value of 2,272,060,800.0 which meant that extrapolating back, the NTP second epoch (i.e. started at 0) at 00:00 hours on January 1, 1900. The NTP packet includes a 2 bit LI, or leap second indicator ( see App_23_part1_NTP) with possible indications as follows: LI Value Meaning ------------------------------------------------------00 0 no warning 01 1 last minute has 61 seconds 10 2 last minute has 59 seconds 11 3 alarm condition (clock not synchronized) Typically the value of 2 ( binary 10) is never used as the earth is always slowing down, meaning leap seconds if needed are only ever added in. If a leap second is to be applied, the NTP leap indicator will be set and the information passed to the client within the NTP packet. It is the responsibility of the client to correctly apply the leap second at the right time. The NTP timescale is suspended during the application of a leap second, i.e. the NTP second will read the same value for two consecutive UTC seconds, see below for the transition on June 30, 2012; Date June 30, 2012 June 30, 2012 June 30, 2012 July 1, 2012 Time 23:59:58 23:59:59 23:59:60 00:00:00 NTP Second 3550089598 3550089599 3550089599 <<<< NTP time suspended 3550089600 Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com Although in concept, the addition of a leap second is relatively simple, the implementation of automatically adding a leap second to a clock is quite complex. The starting point is to be able to flag whether or not a leap second should be added. For the many clocks based on received signals from the GPS (Global Positioning Satellite) system (also the WWVB radio transmission), this is relatively straightforward as there is a special indicator set aside within the transmitted message to show whether or not a leap second is to be added at the next cycle, either June 30, or December 31. In GPS this indicator may be set up to six months, or in WWVB up to one month, before the application of a leap second, once it has been determined that a leap second is to be applied. For clocks based on receiving "time code" signals there is also an indicator set aside within the time code message to show whether or not a leap second is pending (bit number 60 of the control codes, 1=pending leap second, set up to 59 seconds prior ) plus another bit (bit number 61) to show whether the leap second is to be added or deleted (0 = add, 1=delete) at the next leap second cycle. For those interested in the sequencing of the automatic application of the leap second, a partial flow chart is shown in Appendix A. Finally, for clocks operating completely independently to add a leap second at the right time it is necessary to manually set a leap second indicator. In practice few (if any) have this capability. Further information on leap seconds can be obtained at the NIST web site at: http://www.nist.gov/pml/div688/grp50/timescaledata.cfm What About Leap Years ? Leap years are years with 366 days, instead of the usual 365. Leap years are necessary because the actual length of a year is 365.242 days, not 365 days, as commonly stated. Basically, leap years occur every 4 years, and years that are evenly divisible by 4 (2004, for example) have 366 days. This extra day is added to the calendar on February 29th. However, there is one exception to the leap year rule involving century years, like the year 1900. Since the year is slightly less than 365.25 days long, adding an extra day every 4 years results in about 3 extra days being added over a period of 400 years. For this reason, only 1 out of every 4 century years is considered as a leap year. Century years are only considered as leap years if they are evenly divisible by 400. Therefore, 1700, 1800, 1900 were not leap years, and 2100 will not be a leap year. But 1600 and 2000 were leap years, because those year numbers are evenly divisible by 400. For additional information about our year, please see: http:/www.webexhibits.org/calendars/ Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com Appendix A - Automatic Application Of Leap Seconds Update Time - run once per second Reset lse armed No is a leap second pending ? are we in month 1 or 7 ? No No No Yes is hour = 23 ? (UTC) is minute = 59 ? (UTC) is day Dec 31 OR June 30 ? Set lse armed Go to bump time Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com Reset leap second pending Bump Time - called from Update Time No is second > 59 + lse ? is lse armed ? No Flag NTP for update subtract (60+last_lse) from seconds add 1 to minute No is minute > 59 ? minute = 0 add 1 to Hour Adjust day, month, year etc. Precise Time and Frequency, Inc. 50L Audubon Road, Wakefield, MA 01880, USA Tel: +1 781 245 9090 Fax: +1 781 245 9099 www.ptfinc.com
© Copyright 2026 Paperzz