Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 11 May 2024 17:28:54 -0400
From: Rich Felker <>
To: Petr Pisar <>
Subject: Re: 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 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


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.