This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] In do_get_time, %S from 0 to 59, or 60, or even 61?!?


Thanks Martin and Carlo for your quick feedback!

Martin Sebor wrote:

In alignment with C99, POSIX (SUSv3) strptime() accepts values
in the range [0,60]. Being based on C89, SUSv2 accepts [0,61].
I would do whatever strftme()/strptime() does on each platform.

Yes, seems the best thing to do: _GLIBCXX_USE_C99 is defined on C99 platforms and we can use it for chosing 60 or 61. The corresponding autoconf tests are rather strict but the worst that can happen is that we accept 61 too. Seems a good approximation, for now.

FWIW, here's an interesting paper on the history of the leap
second:
http://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf

Indeed, *very* interesting: I'm printing it!


Thanka again,
Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]