Redhat has provided a couple of excellent articles describing the upcoming leap second as well as how to handle it. Here, I want to demonstrate the behavior of a server not running NTP.

Configure system to use the “right” zoneinfo

The test machine is on CentOS 6.6 x64 running on cloud. It has the latest tzdata. I switch the system to the “right” zoneinfo such that a leap second will be introduced.

Observe the insertion
From this experiment, I had to reboot the machine in order for the system to reload the zoneinfo data – unlike what others suggested that glibc will automatically reload tzdata. Then I run a simple Java program to display what happens between 2015-07-01 07:59 and 2015-07-01 08:00. Noticed that the 59th second is repeated once:

So this is how we slow down the computer and let the Earth catch up. To me, this is not the smartest idea. Scientist should tune their atomic clocks and insert several ms every now and then. If the idea is for the atomic clock to be accurate, that’s how the adjustment should be made, not just add 1000ms like this.

The Java program is extremely simple. It prints time every 50ms.

References from Redhat:

  • Leave a Comment