From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Cc: David Steele <david@pgbackrest.org>
Subject: Re: [musl] Possible issue formatting epoch time with strftime()
Date: Tue, 3 Jun 2025 17:03:35 +0200 [thread overview]
Message-ID: <aD8Ox7DFbYB6JJkG@voyager> (raw)
In-Reply-To: <70c350e5-78cd-4ab9-ae9b-598179ee4f8e@pgbackrest.org>
Am Mon, Jun 02, 2025 at 07:33:41PM +0000 schrieb David Steele:
> Ubuntu 22.04 (UTC) gcc:
>
> local epoch: 1573222014
> utc epoch: 1573240014
> local time: 20191108-090654
> utc time: 20191108-140654
>
> [...]
>
> Alpine 3.21 (America/New_York or UTC) gcc/musl:
>
> local epoch: 1573222014
> utc epoch: 1573222014 <------
> local time: 20191108-090654
> utc time: 20191108-140654
>
I think what happened here is that musl is currently implementing
non-standard extension behavior that is no longer conforming as of last
year. My reading of POSIX-2024 is that strftime() is to treat the
incoming timestamp as local time, at least for the purpose of a %s
conversion. Which it isn't at the moment. But POSIX-2018 did not
specify %s at all, so musl was allowed to do whatever until POSIX-2024.
Ciao,
Markus
next parent reply other threads:[~2025-06-03 15:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <70c350e5-78cd-4ab9-ae9b-598179ee4f8e@pgbackrest.org>
2025-06-03 15:03 ` Markus Wichmann [this message]
2025-06-03 21:52 ` David Steele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aD8Ox7DFbYB6JJkG@voyager \
--to=nullplan@gmx.net \
--cc=david@pgbackrest.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).