-1

Did you ever watch what happens with a sleep during a leap second or what date will show us? Most UNIX systems can handle a sleep with a fraction of a second and the date command can display milliseconds. I didn't look at the source but will the sleep wake up during the leap second? probably yes. And what will "date" show? the POSIX definition says it is 23:59:60

If I have time I will take a close look at this script:

while true; do sleep 0.1; date '+%m%d %H:%M:%S %3N'; done

The leap-seconds.3629404800 file says 1 Jul 2015 which I installed for the ntp daemon.

Then we have the next possibility to watch.

HopelessN00b
  • 54,273
hans
  • 21

1 Answers1

3

I think what you're getting at is, "what does it look like within the system when a leap second is happening", right?

Pretty much the same as a time zone's daylight savings change, if your servers are unfortunate enough to be set up on a daylight savings clock.

If an extra second (or hour) is being added, the timestamp will happen twice: at the end of the leap second, time will be reset back to the start of the leap second.

If a second (or hour) is removed, those times are skipped and apparent timestamps will jump forward.

Shane Madden
  • 116,404
  • 13
  • 187
  • 256