From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Russ Allbery <eagle@eyrie.org>
Cc: tz@iana.org, musl@lists.openwall.com
Subject: [musl] Re: [tz] Weird PST8PDT and EST5EDT behavior on Alpine Linux
Date: Tue, 5 Mar 2024 10:52:23 +0700 [thread overview]
Message-ID: <ZeaW91rIn9kkNR0V@danh.dev> (raw)
In-Reply-To: <87edcqv69m.fsf@hope.eyrie.org>
On 2024-03-03 22:51:49-0800, Russ Allbery via tz <tz@iana.org> wrote:
> Why would the system decide that time stamp should use daylight saving
> time? The system time zone is set to UTC, so it shouldn't be some sort of
> contamination from it. Or is this some odd bug in the busybox date
> command? It works correctly with busybox 1.36.1 on a Debian system,
> though:
>
> % busybox env TZ=PST8PDT date -R -d @1643145780
> Tue, 25 Jan 2022 13:23:00 -0800
>
> The Alpine Linux system in question does have PST8PDT and EST5EDT files in
> /usr/share/zoneinfo. The Olson time zone identifiers do work as expected:
Please correct me if I were wrong!
(also added musl-lib list)
I believe it's musl-libc's behaviours.
Both PST8PDT and EST5EDT are timezones in POSIX form.
musl specificly check for that first [1].
Time POSIX form is (space inserted for clarity):
std offset[dst[offset][,start[/time],end[/time]]]
But seems like nothings was enforced if rule isnot given in the
timezone, which makes it open to intepretion.
Musl inteprete that as no transition at all [2].
1: https://git.musl-libc.org/cgit/musl/tree/src/time/__tz.c?h=v1.2.5&id=0784374d561435f7c787a555aeab8ede699ed298#n159
2: https://git.musl-libc.org/cgit/musl/tree/src/time/__tz.c?h=v1.2.5&id=0784374d561435f7c787a555aeab8ede699ed298#n240
--
Danh
next parent reply other threads:[~2024-03-05 3:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87edcqv69m.fsf@hope.eyrie.org>
2024-03-05 3:52 ` Đoàn Trần Công Danh [this message]
2024-03-05 4:31 ` Paul Eggert
2024-03-05 20:12 ` Rich Felker
2024-03-05 20:56 ` Russ Allbery
2024-03-05 21:37 ` [musl] Re: [tz] [musl] " Guy Harris
2024-03-05 22:03 ` Russ Allbery
2024-03-05 22:12 ` Guy Harris
2024-03-05 22:31 ` Russ Allbery
2024-03-06 15:39 ` James Cloos
2024-03-08 17:46 ` [musl] Re: [tz] " Paul Eggert
2024-03-08 19:02 ` Rich Felker
2024-03-09 0:09 ` James Cloos
2024-03-09 1:57 ` [musl] Re: [tz] [musl] " Guy Harris
2024-03-08 18:39 ` Guy Harris
2024-03-08 19:05 ` [musl] Re: [tz] " Paul Eggert
2024-03-09 0:03 ` [musl] " James Cloos
2024-03-06 0:47 ` [musl] Re: [tz] " Paul Eggert
2024-03-06 1:54 ` Rich Felker
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=ZeaW91rIn9kkNR0V@danh.dev \
--to=congdanhqx@gmail.com \
--cc=eagle@eyrie.org \
--cc=musl@lists.openwall.com \
--cc=tz@iana.org \
/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).