From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C85E385702B; Mon, 8 Aug 2022 19:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C85E385702B From: "yann at droneaud dot fr" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: time X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yann at droneaud dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2022 19:21:31 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29460 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=3D14266&action=3Ded= it 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-Strin= g-Parsing.html > %p > %P >=20 > The locale-dependent equivalent to =E2=80=98AM=E2=80=99 or =E2=80=98P= M=E2=80=99. >=20 > This format is not useful unless %I or %l is also used. Another compl= ication is that the locale might not define these values at all and therefo= re the conversion fails. >=20 > %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=3D4772 is incompl= ete. --=20 You are receiving this mail because: You are on the CC list for the bug.=