public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug time/29460] New: strptime() doesn't support strftime() %P format
@ 2022-08-08 19:21 yann at droneaud dot fr
2022-08-08 19:58 ` [Bug time/29460] " sam at gentoo dot org
0 siblings, 1 reply; 2+ messages in thread
From: yann at droneaud dot fr @ 2022-08-08 19:21 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29460
Bug ID: 29460
Summary: strptime() doesn't support strftime() %P format
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: time
Assignee: unassigned at sourceware dot org
Reporter: yann at droneaud dot fr
Target Milestone: ---
Created attachment 14266
--> https://sourceware.org/bugzilla/attachment.cgi?id=14266&action=edit
strftime(), strptime() %P format test
Despite being documented as supported alias to %p, %P is not known to
strptime()
https://www.gnu.org/software/libc/manual/html_node/Low_002dLevel-Time-String-Parsing.html
> %p
> %P
>
> The locale-dependent equivalent to ‘AM’ or ‘PM’.
>
> This format is not useful unless %I or %l is also used. Another complication is that the locale might not define these values at all and therefore the conversion fails.
>
> %P is a GNU extension following a GNU extension to strftime.
https://man7.org/linux/man-pages/man3/strptime.3.html
> Similarly, because of GNU extensions to strftime(3), %k is
> accepted as a synonym for %H, and %l should be accepted as a
> synonym for %I, and %P is accepted as a synonym for %p.
The attached test case produced the following output:
strftime() produced "am"
strptime() failed to parse "am"
strftime() produced "pm"
strptime() failed to parse "pm"
Fixes for https://sourceware.org/bugzilla/show_bug.cgi?id=4772 is incomplete.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug time/29460] strptime() doesn't support strftime() %P format
2022-08-08 19:21 [Bug time/29460] New: strptime() doesn't support strftime() %P format yann at droneaud dot fr
@ 2022-08-08 19:58 ` sam at gentoo dot org
0 siblings, 0 replies; 2+ messages in thread
From: sam at gentoo dot org @ 2022-08-08 19:58 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29460
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gentoo dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-08 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 19:21 [Bug time/29460] New: strptime() doesn't support strftime() %P format yann at droneaud dot fr
2022-08-08 19:58 ` [Bug time/29460] " sam at gentoo dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).