From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id A2FA120EE2 for ; Sat, 11 May 2024 23:28:46 +0200 (CEST) Received: (qmail 14112 invoked by uid 550); 11 May 2024 21:28:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 14068 invoked from network); 11 May 2024 21:28:40 -0000 Date: Sat, 11 May 2024 17:28:54 -0400 From: Rich Felker To: Petr Pisar Cc: musl@lists.openwall.com Message-ID: <20240511212853.GS10433@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] strptime(s, "%Y-%j", &tm) does not update month and day On Sat, May 11, 2024 at 05:24:59PM +0200, Petr Pisar wrote: > Hello, > > When debugging a libisds test failure with musl-1.2.5 > , I found that musl's > strptime() does not handle "%Y-%j" properly. It accepts the format, it parses > the input string, it returns a correct pointer past the input string, but it > does not update tm.tm_mon and tm.tm_mday fileds of the third argument. This is behaving as specified. Previously, the behavior was unspecified. POSIX has amended it for future issues as the resolution of https://austingroupbugs.net/view.php?id=1727 to read: The tm_yday member of the tm structure pointed to by tm shall be set to this number minus 1. strptime generally does not behave like mktime, doing normalizations/conversions. Rich