Re: [chrony-dev] [GIT] chrony/chrony.git branch, master, updated. 1.26-41-g824e86a

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Fri, Feb 24, 2012 at 09:17:42AM -0800, Bill Unruh wrote:
> Leapseconds are not in any timeZone. The leapseconds database is a sepatate
> file from all database files. Leapseconds are inserted into UTC, not into any
> timezone.  Whether or not 23:59:60 is valid in the Vancouver timezone is
> irrelevant since the leap second was inserted at 15:59:60 of that time zone. So I am confused about this description.

The timezones in /usr/share/zoneinfo/right are written so the system
clock needs to be in TAI-10s instead of UTC and they do include the
leapsecond data.

Try this:

$ TZ="right/UTC" date -d 'Dec 31 2008 23:59:60'
Wed Dec 31 23:59:60 UTC 2008
$ TZ="right/UTC" date -d 'Dec 31 2009 23:59:60'
date: invalid date `Dec 31 2009 23:59:60'

Note that there wasn't an upstream tzdata release which includes the
2012 leap second yet, but some distributions may have released a
patched tzdata-2011n. 

> (Note that leap seconds can also be subtracted, which would mean that 23:59:58
> would be the last second of that month)

The code actually checks if and how 23:59:60 overflows in mktime(). If
the seconds field after the call is 1, there was one second deleted,
if it's 60, there was inserted second, otherwise no leap second. I've
verified in the simulator the leap second is detected and executed.

> Also leapseconds can be inserted in any month, not just June or Dec ( except
> that those are preferred, and until now, those are the only months that have
> been used.)

I think ntpd makes that assumption too, but could be easily changed.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/