From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A84F7385C322; Mon, 8 Aug 2022 19:29:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A84F7385C322 From: "yann at droneaud dot fr" To: glibc-bugs@sourceware.org Subject: [Bug time/29461] New: strptime() failed to parse negative %s number of seconds since the Epoch, happily produced by strftime() Date: Mon, 08 Aug 2022 19:29:40 +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:29:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29461 Bug ID: 29461 Summary: strptime() failed to parse negative %s number of seconds since the Epoch, happily produced by strftime() 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 14267 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14267&action=3Ded= it strftime(), strptime() %s format test with negative timestamp strftime(,"%s",) can produce negative number of seconds since the Epoch for date before the 1970-01-01, but strptime() refuses to parse negative number= s, thus is unable to parse the string formatted by strftime(). For example, the attached test case reports the following: strftime() produced "-3600" strptime() failed to parse "-3600" --=20 You are receiving this mail because: You are on the CC list for the bug.=