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

Paolo Carlini pcarlini@suse.de
Fri Aug 27 16:26:00 GMT 2004


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.



More information about the Libstdc++ mailing list