The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions > Tips and Tutorials
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-19-2007
Perderabo's Avatar
Perderabo Perderabo is online now
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,448
Leap Seconds

The definition of a second is carefully fixed. Each second is exactly as long as any other second. When scientists were tying down the precise value of a second, they matched it as exactly as possible to the year 1900. There are 24*60*60=86400 seconds in a day. But the Earth has slowed down a bit mostly due to tidal forces. Every year it needs about .7 seconds extra. Every now and then we have a day with 86401 seconds. Unix tries to pretend that this is not the case. If you are not running NTP, then you must periodically manually tweak your clock and you will compensate for a leap second during your next manual adjustment.

If you are running NTP, Unix tries to make the last second of the day with a leap second last for 2 seconds. With many implementations, the second will inappropriately advance in the middle of this special long second and will be adjusted backwards a few milliseconds later.

So ignoring the potential messy second-long transition, we treat each day as if it was 86400 seconds long.

By the way, it took about a century for the Earth to slow down enough to need .7 seconds extra each year. It will take another century for to slow down enough to need about 1.4 seconds extra year. Do not think that each year is .7 seconds longer than its immediate predecessor.