public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "yann at droneaud dot fr" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug time/29460] New: strptime() doesn't support strftime() %P format Date: Mon, 08 Aug 2022 19:21:30 +0000 [thread overview] Message-ID: <bug-29460-131@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2022-08-08 19:21 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-08 19:21 yann at droneaud dot fr [this message] 2022-08-08 19:58 ` [Bug time/29460] " sam at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29460-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).