Subject: Re: lib/5183: strptime(3) still has a bug about "%I %p"
To: None <netbsd-bugs@NetBSD.ORG>
From: Geoff Wing <firstname.lastname@example.org>
Date: 03/24/1998 00:43:45
NAKAJIMA Yoshihiro <email@example.com> typed:
:On Sun, 22 Mar 1998 17:25:50 -0500 (EST)
:Todd Vierling <tv@NetBSD.ORG> wrote:
:> On Sun, 22 Mar 1998, der Mouse wrote:
:> : > const char *buffer = "12 AM"; /* noon */
:> : Aren't 12:00 times considered to belong to the following, not
:> : preceding, 12-hour interval? That is, isn't 12 AM midnight, rather
:> : than noon?
:> I anticipated this type of response when I fixed strptime(3) because neither
:> of the two PRs on this seemed to notice or fix the bug that 12 AM could
:> incorrectly be represented as hour 12.
:I'm so sorry. I thought that `12 AM' came one hour after `11 AM'.
That would be silly :-)
And Ty Sarna <firstname.lastname@example.org> typed:
:IMNSHO, it *is* a bug... not in NetBSD, but in time conventions. I'd
:report it, but I don't know who the current maintainer of western
:civilization is :-)
It's not a `bug'. You just have to know what acronyms are, and what they
A.M. = ante meridian
P.M. = post meridian
meridian happens at 12:00 exactly. There's really no such thing as
``12 A.M.'' or ``12 P.M.''. It's ``12 midnight'' or ``12 noon''.
However, since 12:01 is 12.01 P.M. and 00:01 is 12.01 AM, people like to
(incorrectly) use 12 P.M. meaning 12:00 and 12 A.M. meaning 00:00
In uses like strptime(3), it's easier to accomodate that than to force
everyone to use ``12 midnight'' and ``12 noon''.
Therefore, strptime(3) is doing The Right Thing.
Geoff Wing <email@example.com> Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/