What's the story on day/year from refclocks?

Hal Murray hmurray at megapathdsl.net
Sun Oct 1 18:28:24 UTC 2017


devel at ntpsec.org said:
> There's magic code in the NMEA driver that computes the year from other dare
> components based on some calendrical trick I don't understand. A comment
> notes that it will fail in 2399.

> Under consideration for 1.0, once I *do* undertstand it: making all refclock
> drivers use this. 

That sounds like the sort of magic that could do the wrong thing without 
warning.  Maybe we should have a flag to enable it and/or why would we want 
to add that to other drivers?

NMEA may be special since some of the date formats only have 2 digits of 
year.  I think the standard century rollover fixup based on the build date 
would be better than something that is hard to explain.

Another possibility would be to have a per-driver GPS flag and apply the 
normal GPS rollover fixup based on the build date.  That is at least 
reasonable to describe.  But it only works for 20 years.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list