On 1/15/19 4:19 PM, Hal Murray wrote:

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.
Some modules (Python skyfield package from Rhodes Mill) explicitly deal with this. The time object has a method for each time scale..

These return utc in various formats
time.utc_jpl()
time.utc_iso()
time.utc_datetime()

These return other timescales
time.tai
time.tt
time.J
time.ut1

I confess I have used them blindly without checking, but I can do that quickly.
_______________________________________________
LEAPSECS mailing list
LEAPSECS@leapsecond.com
https://pairlist6.pair.net/mailman/listinfo/leapsecs

Reply via email to