[LEAPSECS] POSIX? (was Time math libraries, UTC to TAI)

Hal Murray hmurray at megapathdsl.net
Sat Dec 31 00:46:11 EST 2016


imp at bsdimp.com said:
>> Could that be solved with 2 functions in the API, one for N seconds
>> from now, and a second for at some future date/time specified in
>> Y/M/D/H/M/S format rather than something like a time_t?

> Only partially (meaning only assuming every day has exactly 86400 seconds).
> These operations are possible today, since the former is += and the latter
> is timegm(), sorta, but neither groks leap seconds. And if you were to
> transition to a TAI world, then you'd not be able to implement the latter
> for a TAI time of the UTC time at some Y/M/D/H/M/S past the end of the next
> six month boundary, since it is impossible to have that knowledge.

Sorry, I didn't fully explain what I was trying to suggest.

Suppose the kernel keeps time in TAI and has a call to wait N SI seconds.

Suppose I want to wait until some UTC date/time more than 6 months in the 
future.  A library routine doesn't have to compute how many seconds to wait 
right now.  It can break it down into chunks.  Wait until the current leap 
file expires, then try again using the new one.  ...



-- 
These are my opinions.  I hate spam.





More information about the LEAPSECS mailing list