This is the mail archive of the
mailing list for the libstdc++ project.
Re: [RFC] In do_get_time, %S from 0 to 59, or 60, or even 61?!?
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 27 Aug 2004 18:24:35 +0200
- Subject: Re: [RFC] In do_get_time, %S from 0 to 59, or 60, or even 61?!?
- References: <412F12FB.firstname.lastname@example.org> <412F545C.email@example.com>
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
Indeed, *very* interesting: I'm printing it!