Cruft: There are 3 routines that convert time_t to text

Hal Murray hmurray at megapathdsl.net
Wed Mar 15 18:50:30 UTC 2017


esr at thyrsus.com said:
>> I never figured out what the fs and ls were trying to tell me.  Before the 
>> cleanup, the fs were probably converting ntp l_fp epoch times.
> No, I don't think I changed those.  Lost in the mists of time... 

I was referring to my recent leap second cleanup.


> Thanks. I've merged the first two functions and changed the third to use
> proper RFC3339 format.  I'd rewrite it more, but the function that was
> fstostr has away of reporting out of range that is incompatible with the was
> ctl_puts() wants to call it. 

You can remove that out of range check.  ctl_pitfs is only called twice to 
print the time of the last leap second and the expiration time of the file.   
 They should be sane.  We can add a sanity check but there is already a 
checksum on the file.  I'd be happy with strange looking printout as long as 
it doesn't crash.

64 bit time_t is going to have this problem all over the place.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list