From: John Stultz <john.stultz@linaro.org>
To: David Howells <dhowells@redhat.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
ksummit-discuss@lists.linuxfoundation.org,
Miroslav Lichvar <mlichvar@redhat.com>
Subject: Re: [Ksummit-discuss] Leap second handling
Date: Wed, 16 Dec 2015 16:44:20 -0800 [thread overview]
Message-ID: <CALAqxLVb7dfeN-u07w3ai5V23iZpNi8krb0kji0iC1RuM9xn9Q@mail.gmail.com> (raw)
In-Reply-To: <30286.1450312325@warthog.procyon.org.uk>
On Wed, Dec 16, 2015 at 4:32 PM, David Howells <dhowells@redhat.com> wrote:
> John Stultz <john.stultz@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.
thanks
-john
prev parent reply other threads:[~2015-12-17 0:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 11:33 David Howells
2015-12-15 12:12 ` Arnd Bergmann
2015-12-15 14:15 ` Alexandre Belloni
2015-12-16 5:12 ` John Stultz
2015-12-17 0:32 ` David Howells
2015-12-17 0:44 ` John Stultz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALAqxLVb7dfeN-u07w3ai5V23iZpNi8krb0kji0iC1RuM9xn9Q@mail.gmail.com \
--to=john.stultz@linaro.org \
--cc=dhowells@redhat.com \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=mlichvar@redhat.com \
--cc=prarit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox