[Ksummit-discuss] Leap second handling
john.stultz at linaro.org
Thu Dec 17 00:44:20 UTC 2015
On Wed, Dec 16, 2015 at 4:32 PM, David Howells <dhowells at redhat.com> wrote:
> John Stultz <john.stultz at linaro.org> wrote:
>> As for how to treat the certs, you're option #1 "Treat it as hh:mm:59" is
>> probably the closest to what the kernel does, since it repeats the 59th
>> second on the leapsecond.
> mktime64() appears to treat hh:mm:60 as the equivalent of the 0th second of
> the next minute simply by adding the seconds on last with no checking.
> I'm okay with implementing #1 or #2 for now (ie. treating as :59 of this
> minute or :00 of the next minute) with a comment in the code indicating that
> this is what we're doing.
> Should I have mktime64() handle it or should I handle it in my X.509 code
> though? I favour the former as it's then a general solution that can be
> handled in a single place. I could put the handling of 24:00:00 being
> equivalent of 00:00:00 of the next day there also.
I think having it handled in mktime64 sounds reasonable to me. But the
behavior should be very clearly documented there, and ideally match
the kernel's behavior.
Cc'ing in other time folks for their thoughts.
More information about the Ksummit-discuss