Re: [chrony-users] leapsectz and phc refclock offset |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
chrony assumes that the time delivered by your server clocks is correct. It
makes no assumptions about what sort of time is delivered. Now, you could
modify chrony to have it deliver utc rather than TAI. You could alster your
server to deliver UTC or you couuld have your timezonefiles do the conversion.
Or you could use the /usr/share/zoneinfo/right files to convert to your
favourite time assuming you system clock is in TAI rather than UTC. You could
have to make sure that you kept your leapsecond file up to date since it uses
that to figure out how may seconds it should alter
Mind you the "right" files only count leap seconds since 1970 (UT1), and do not
include the 10 seconds that was the TAI difference between U and TAI in 1972.
So you would have to edit the tzdata so that the "right" files included that
10 sec if you really want TAI( eg add 10 to each of the times. That way your system clock could be in TAI and
the date funtions still returns the correct time for your timezone.
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/
On Thu, 21 Sep 2017, Chris Perl wrote:
I have chrony servers that are using phc refclocks. Those refclocks are kept in TAI, so I have to specify the current TAI-UTC
offset in the `refclock' directive ("offset -37").
I cross check that the current value I have set there seems sane via some monitoring that uses the timezone files to compute the
difference between posix/UTC and right/UTC. So, at least when it changes, I'll find out about it (I also make sure my timezone
files are up to date). The downside is obviously that I have to go update a bunch of config files and restart chronyd when the
next leap second occurs.
I was hoping that I'd be able to use the `leapsectz' directive to ask chrony to automatically calculate the TAI-UTC offset for
my refclock, but after some testing, I'm not sure that is possible (or, I'm just doing something wrong).
Is the idea of the leapsectz directive just that your refclock gives you whatever time it gives you (perhaps TAI, perhaps UTC)
and the timezone files are just used so chrony can, for example, arm the kernel (if leapsecmode is system) and advertise the
impending leap second to downstream clients?
Assuming I'm not misunderstanding, would it be possible to add something to allow the TAI-UTC offset to be dynamically
calculated using the timezone files for refclocks?