Leap Seconds and its Effects on Site Reliability

A leap second is a One Second adjustment that is occasionally applied to UTC, to accommodate the difference between precise time (International Atomic Time (TAI)) and imprecise observed solar time (UT1), which varies due to irregularities in the Earth’s rotation.

  • Elapsed time in seconds between two given UTC dates can go wrong.
  • Time distribution systems announce leap seconds only in the last minute and some even not at all. Clocks that are not regularly synchronized can miss a leap second.
  • Not all clocks implement leap seconds in the same manner. Unix repeats 23:59:59 or adds 23:59:60. NTP freezes time during the leap second.
  • The textual representation of leap seconds is defined as “23:59:60”. Not all programs are familiar with this format and can’t deal with such input.
  • Linux assign to the leap second the counter value of the preceding, 23:59:59 second (59–59–0 sequence), while other OSs assign to the leap second the counter value of the next, 00:00:00 second (59–0–0 sequence). There is no standard governing this sequence, which explains flaws in time-critical systems that rely on timestamped values.
  • Following the June 30, 2012 leap second, Reddit, Inc. (Apache Cassandra), Mozilla (Hadoop), Qantas, and various sites running #Linux faced production issues.
  • Cloudflare’s DNS resolver incorrectly calculated a negative number when subtracting two timestamps obtained from the Go’s time.Now() function, which then used only a real-time clock source
  • The Intercontinental Exchange, parent body to 7 clearing houses and 11 stock exchanges including the NYSE, ceased operations for 61 minutes at the time of the June 30, 2015 leap second



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store