[LEAPSECS] Running on TAI

Hal Murray hmurray at megapathdsl.net
Tue Jan 15 19:19:27 EST 2019


> The trick is to find a source that will set a POSIX system to TAI, and then
> to avoid the gotchas that happen when such a system interacts with other
> POSIX systems. 

What do the systems that point telescopes use for maintaining their system 
clock?  Do they use NTP or a special program that listens to GPS or a local 
Hydrogen maser or ...?

Some GPSDOs have the option to return GPS time rather than UTC.  GPS is a 
fixed offset from TAI.  So it's easy to run your system on TAI.  All it takes 
is a little sysadmin hacking, no programming.

You won't easily get redundancy from checking with other NTP servers.  If you 
have several friends running similar systems, you could set up a private NTP 
network.

With some work it would be reasonable to setup a ntp server that took in UTC 
but gave out TAI.  That would be similar to the way leap smearing works.  We 
could use a separate port number to minimize confuzion.

As far as I know, the kernel doesn't know anything about what type of time it 
is maintaining.  It just sets the clock as directed and goes tick, tick, tick. 
 The trouble is with the time conversion routines.  They all assume a time_t 
is UTC.  So if you ran your system on TAI, all your log files would be off by 
37 seconds.

How hard would it be to insert a wrapper in front of the time conversion 
routines?  The idea is to rename all the current time conversion routines from 
foo to foo_utc and implement foo_tai that concerts between UTC and TAI.  It 
would need a list of leap seconds.  The default implementation of foo would 
call foo_utc but an environment variable or such would switch to using foo_tai.
 

-- 
These are my opinions.  I hate spam.





More information about the LEAPSECS mailing list