From nobody Fri Nov 22 10:36:14 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xvs2m0FzSz5dkP5 for ; Fri, 22 Nov 2024 10:36:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xvs2l0w6Pz4cS5 for ; Fri, 22 Nov 2024 10:36:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732271775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmVR/tY41bVaZHRKeNo9mhPGIkyEYL7uNd2tujhuWic=; b=kMCgyqhHvjOu4po/WSHZjSyXlMoqD/rt+fKD4/cnBobf0OmoJx0LuezWr0R7A8vc/GwWJH AQUF9CnvXUK4mKbCb4gqW7bYTl0GecoOJte0CdZO1pNHrfgRtRfmrT3wePg4ZRVH2C5qZ5 NGHeQf2xTQeK48E9oM93GWKsHRYA1kOO6FCGJt+8RX+imDI73yRI3Rca4gTYnzZfhSuJ6h XkLs2SlxkOLV923wCRX0xOc96ATWhrQJQvI3qkQGn2F56y7ztlC1a9ZOuXPypRjE8VRY09 HjLfWgDB+hXW3Y0vvczi5/CAynRKsCNVuCVxuApaV+vBWA2QsrZn657XcljxOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732271775; a=rsa-sha256; cv=none; b=pNLPoZcoe+z2jW+J58gjJxc0AUZ7Q9Gv0wPxT3UJRxeIGELKQEE2lgvTxeOe2yIYQTIbGq 5AAiOcHywsDKVNfJy/vNoIz1BvP0ZqtEACkuWrOvYLRPMM2+5yA7JXxdzfk/oGxq2+1ven aKdnasih6iAWM/SIiiHvu5uUtc4tjDrk9aKQRbmoUI2z4fUXk6L0+19mSHbn8VpMgNlyIN 6hvS8eQz3NPEADmpfoagecdsDEy3mqBquAc6ra1bWxohqeDN4kvMj0eihyYCT6wyeFicqR jgJKz9bbJ5ZQrG9VHzR5EWlnT0jc924VRlkWesKGYM3L1xgYCbCtlYUi+gx7cA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xvs2l0WclzLMm for ; Fri, 22 Nov 2024 10:36:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4AMAaEqo097320 for ; Fri, 22 Nov 2024 10:36:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4AMAaEiA097314 for bugs@FreeBSD.org; Fri, 22 Nov 2024 10:36:14 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 282916] The strptime() function in libc/stdtime parses an incorrect wday value with the %x format for dates after 12/31/00 Date: Fri, 22 Nov 2024 10:36:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: erkki.moorits@mail.ee X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.mimetype attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282916 Bug ID: 282916 Summary: The strptime() function in libc/stdtime parses an incorrect wday value with the %x format for dates after 12/31/00 Product: Base System Version: 14.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: erkki.moorits@mail.ee Attachment #255388 text/plain mime type: Created attachment 255388 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D255388&action= =3Dedit Test code for strptime(..., "%x", ...) When I use strptime() input descriptor "%x" to decode date, then after 12/3= 1/00 strptime() decodes wrong wday. Here are the different test results from the attached test program. Expected decoded values are (reference tests on Ubuntu Linux): 12/31/00: Time: 00:00:00 Date: 2000-12-31 Wday: 0 Yday: 365 (DST 0 Zone [(null)] offset 0) 01/01/01: Time: 00:00:00 Date: 2001-01-01 Wday: 1 Yday: 000 (DST 0 Zone [(null)] offset 0) 01/02/01: Time: 00:00:00 Date: 2001-01-02 Wday: 2 Yday: 001 (DST 0 Zone [(null)] offset 0) Actual values on FreeBSD 14.1-RELEASE-p5 GENERIC amd64: 12/31/00: Time: 00:00:00 Date: 2000-12-31 Wday: 0 Yday: 365 (DST 0 Zone [(null)] offset 0) 01/01/01: Time: 00:00:00 Date: 2001-01-01 Wday: 0 Yday: 000 (DST 0 Zone [(null)] offset 0) 01/02/01: Time: 00:00:00 Date: 2001-01-02 Wday: 1 Yday: 001 (DST 0 Zone [(null)] offset 0) Also wday values from %c and %x are different (first lines are decoded by u= sing %c, last by using %x): Fri Mar 4 20:05:34 2005: Time: 20:05:34 Date: 2005-03-04 Wday: 5 Yday: 062 (DST 0 Zone [(null)] offset 0) 03/04/05: Time: 00:00:00 Date: 2005-03-04 Wday: 4 Yday: 062 (DST 0 Zone [(null)] offset 0) --=20 You are receiving this mail because: You are the assignee for the bug.=