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, 24 Feb 2012, Miroslav Lichvar wrote:

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.

Why not just use the leapseconds file? And

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'

And TZ="right/America/Vancouver" date -d 'Dec 31 2008 15:59:60'
Wed Dec 31 15:59:60 PST 2008

Ie, you have to know the timezone offset in order to test the right time. Furthermore people are going to put in just "America/Vancouver" for example,
without the /right. (Do all distributions distribute the "right" database?)
Ie, I think that this is far too open to problems on the part of the user. One option would be to use the leapseconds file instead. I think this
procedure makes the time depend on stuff that should be kept entirely separate
from chrony or ntpd-- namely time zone information. Not maintaining the
separation of function leaves everything far to liable to having bugs creep
in I think.



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.

The latest leapseconds file tzdata2011n.tar.gz does not have this year's
leapseconds in it yet. And by the time it comes out, the distros are going to
take a few months to update and for users to install. Thus there are four
steps. leapseconds file released. Distros recompile the tzdata including the
"right" directory. Users knowing that they should use the "right" database,
and the program knowing that the timezone file used needs to have the correct
offset tested to see if there is a leapsecond. I think it is too complicated.



(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.



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

--
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/