From: Rich Felker <dalias@libc.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: James Cloos <cloos@jhcloos.com>, musl@lists.openwall.com, tz@iana.org
Subject: Re: [musl] Re: [tz] Weird PST8PDT and EST5EDT behavior on Alpine Linux
Date: Fri, 8 Mar 2024 14:02:44 -0500 [thread overview]
Message-ID: <20240308190243.GP4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <ac7b4972-ca62-486d-8363-b61ed09c0ed7@cs.ucla.edu>
On Fri, Mar 08, 2024 at 09:46:24AM -0800, Paul Eggert wrote:
> On 2024-03-06 07:39, James Cloos via tz wrote:
>
> >(I must say it was a bit anoying that the library kept the original
> >definition of EST5EDT et alia rathar than moving with the legislation.
> >But only a bit.)
>
> So Openwrt uses pre-2007 US daylight saving rules for TZ='EST5EDT'?
> That's puzzling. I thought Openwrt is based on musl, which ignores
> DST for that TZ setting (a behavior that POSIX allows). I'm a bit
> curious as to what's going on there.
It's not so much that we ignore it (it's present in tzname[1], and
would get applied if you use mktime with tm_isdst=1), just that, in
the absence of a transition rule for it, it's never considered active.
I don't think this is a particularly good behavior (even though it is
allowed by POSIX) but nothing great has been proposed as an
alternative.
> >So I have to use EST5EDT,M3.2.0/2:00:00,M11.1.0/2:00:00
> >for the timezone. (The explicit /2:00:00 might be avoidable, but the
> >use of self documenting data can be beneficial.)
>
> For a fully self-documented TZ setting you could use this:
>
> <EST>+05:00:00<EDT>+04:00:00,M3.2.0/+02:00:00,M11.1.0/+02:00:00
>
> However, this sort of thing tends to be error-prone; e.g., suppose I
> forgot a colon?
>
> 'zic' attempts to generate the shortest equivalent TZ setting. On my
> machine /usr/share/zoneinfo/America/New_York ends with this
> equivalent:
>
> EST5EDT,M3.2.0,M11.1.0
Yes, this i the form I've used in the past before we had zoneinfo
support.
Rich
next prev parent reply other threads:[~2024-03-08 19:02 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
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 [this message]
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=20240308190243.GP4163@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=cloos@jhcloos.com \
--cc=eggert@cs.ucla.edu \
--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).