git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9604: Fix test for musl libc and new Debian

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Apr 7, 2024, 01:45 UTC
Message-ID
<ZhH6wq5eTUTZS_zE@danh.dev>
In-Reply-To
<20240407013312.GD1085004@coredump.intra.peff.net>
On 2024-04-06 21:33:12-0400, Jeff King <peff@peff.net> wrote:
Show 22 quoted lines
> On Sat, Apr 06, 2024 at 10:29:10AM +0700, Đoàn Trần Công Danh wrote:
> 
> > CST6CDT and the like are POSIX timezone, with no rule for transition.
> > And POSIX doesn't enforce how to interpret the rule if it's omited.
> > Some libc resorted back to IANA (formerly Olson) db rules for those
> > timezones.  Other libc (e.g. musl) interpret that as no transition at
> > all [1].
> > 
> > In addition, distributions (notoriously Debian-derived, which uses IANA
> > db for CST6CDT and the like) started to split "legacy" timezones
> > like CST6CDT, EST5EDT into `tzdata-legacy', which will not be installed
> > by default [2].
> > 
> > In those cases, t9604 will run into failure.
> > 
> > Let's switch to POSIX timezone with rules to change timezone.
> 
> This made me wonder if we are losing EST5, etc. We use that in t0006,
> for example. But I guess not, since I do not have tzdata-legacy
> installed (I am on Debian unstable) and haven't run into issues (I
> didn't notice the cvsimport one because I lack other prereqs to run
> those tests).
Nah, EST5 is a conformance POSIX timezone.  It read:
    The timezone name is EST, offset is 5hours behinds Universal timezone.
You can check by trying today (or on anyday with DST on):
	TZ=EST5 date
	TZ=EST5EDT date
	TZ=America/New_York date
- The first one will always interpret 5 hours behinds UTC.
- The second one is implementation defined behavior, on glibc system,
  it will depends on the existence of /usr/share/zoneinfo/EST5EDT
- The third one will interpret today time as 4 hours behinds UTC.

glibc normally check if a timezone exist in /usr/share/zoneinfo first, if not, it will interpret by POSIX rule.

-- 
Danh
Previous: Jeff KingNext: Đoàn Trần Công Danh
Message 6 of 12 in “t9604: Fix test for musl libc and new Debian”
  1. t9604: Fix test for musl libc and new DebianĐoàn Trần Công Danh, Apr 6, 2024
  2. Junio C HamanoApr 6, 2024
  3. Đoàn Trần Công DanhApr 7, 2024
  4. Junio C HamanoApr 8, 2024
  5. Jeff KingApr 7, 2024
  6. Đoàn Trần Công DanhApr 7, 2024
  7. Đoàn Trần Công DanhApr 7, 2024
  8. t9604: Fix test for musl libc and new DebianĐoàn Trần Công Danh, Apr 10, 2024
  9. Eric SunshineApr 10, 2024
  10. Đoàn Trần Công DanhApr 10, 2024
  11. Eric SunshineApr 10, 2024
  12. Đoàn Trần Công DanhApr 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.