[ntp:questions] Leap Second

Unruh unruh-spam at physics.ubc.ca
Wed Dec 3 06:29:57 UTC 2008


morsupil <michael.froment at gmail.com> writes:

>On 3 d=E9c, 00:30, Bill Unruh <un... at physics.ubc.ca> wrote:
>> Unruh <unruh-s... at physics.ubc.ca> writes:
>> >michael.from... at gmail.com writes:
>> >>Hi all,
>> >>Since yesterday I saw the leap second Flag set on some servers of
>> >>ntp.pool.org. I'am quite surprise because the leap second add to be
>> >>set the 31/12/2008 and not the 1/12/2008.
>> >>Is it normal????
>> >The leap is announced at the beginning of the month to make sure that al=
>l
>> >ntp clients know about it. It always occurs at the end of the month ( I
>> >think ntpd has it hard coded as the end of June or Dec, but in principle=
> it
>> >could be any month)
>>
>> Here is a fragment from the ntp code (ntp_loopfilter.c) (4.2.4p4)
>>
>> if ((tm->tm_mon + 1 =3D=3D 6 &&
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tm->tm_mday =3D=3D 30) || (tm->tm_mon +
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 =3D=3D 12 && tm->tm_mday =3D=3D 31)) {
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (leap_next & LEAP_ADDSECOND)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ntv.status |=3D STA_INS;
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else if (leap_next &
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LEAP_DELSECOND)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ntv.status |=3D STA_DEL;
>>
>> Ie, ntp pays attention to the leap second flag only if it is June 30 or D=
>ec
>> 31. Now, that is not correct since I believe that a leapsecond can occur =
>on
>> any month, but the tradition is that if there is only one or two a year,
>> those are the dates chosen. In a century or two, when there are more than=
> 2
>> per year, then ntpd will run into trouble. (Of course the definition of
>> time might have changed anyway, or the whole UTC kludge may be scrapped o=
>r
>> a new edition of ntpd not containing that assumption may be published.)
>> Note that the very existence of ntpd with its assumptions puts huge
>> pressure on the standards organisation to comply with the assumptions.

>So this could not cause problem if on a pool of servers someone answer
>with the LI flag set and another one without the LI flag set????
>I'm quite surprise by the fact that ntpd seems to be the standard...
>There is many of other client and many of other servers...

ntpd is largely controlled and  part written by Mills, the original developer of
the ntp protocol, and still strongly involed in the development of ntp.
ntpd is the reference inplimentation-- meaning it does ( module bugs)
exactly what an ntp server/client is supposed to do.

>From the header of ntp_loopfilter.c

"/*
 * ntp_loopfilter.c - implements the NTP loop filter algorithm
 *
 * ATTENTION: Get approval from Dave Mills on all changes to this file!
 *
 */
"




More information about the questions mailing list