This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] In do_get_time, %S from 0 to 59, or 60, or even 61?!?
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 27 Aug 2004 12:54:51 +0200
- Subject: [RFC] In do_get_time, %S from 0 to 59, or 60, or even 61?!?
Hi,
in do_get_time, when we encounter %S we reject anything bigger than
59... However,
the C99 standard is very clear about the leap-second issue that leads to
60 being also
a valid value both in strftime and in tm.tm_sec. AFAIK, C89 even
consider ok *two*
leap seconds, up to 61, crazy...
Shall we at least accept 60 too? I'm tempted to think so, since
otherwise we may
be unable to read back the output of by time_put (which uses internally
just strftime!)
Thanks in advance for any feedback,
Paolo.