[ntp:questions] Leap second question

Stephen Yu syu at symmetricom.com
Wed Mar 20 01:15:51 UTC 2013


Hello,

In the dev release ntp-dev-4.2.7p361, the file ntp_timer.c has the following code to set "sys_leap".

     if (leapsec > 0) {
           leapsec--;
           if (leapsec == 0) {
                sys_leap = LEAP_NOWARNING;
                .........................
           } else {
                if (leapsec < DAY)
                     sys_leap = LEAP_ADDSECOND;
                if (leap_tai > 0)
                     sys_tai = leap_tai - 1;
           }
     }

The question is why "sys_leap = LEAP_ADDSECOND" is unconditional. Is this based on the prior knowledge that earth always rotates slower? In other word, could it ever be "sys_leap = LEAP_DELSECOND"?

Thanks,
Stephen



More information about the questions mailing list