Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeaW91rIn9kkNR0V@danh.dev>
Date: Tue, 5 Mar 2024 10:52:23 +0700
From: Đoàn Trần Công Danh <congdanhqx@...il.com>
To: Russ Allbery <eagle@...ie.org>
Cc: tz@...a.org, musl@...ts.openwall.com
Subject: Re: [tz] Weird PST8PDT and EST5EDT behavior on Alpine Linux

On 2024-03-03 22:51:49-0800, Russ Allbery via tz <tz@...a.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

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.