-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle TZ
environment variable correctly and add support for TZDIR
#856
Comments
In case it's useful, it looks like exa doesn't handle
Running
|
I already knew all that, but mostly the |
Please open an issue against chrono if there is something we can do to help on our side. |
Since exa is unmaintained (see #1243), I’m working to merge my «use-chrono» PR in the active fork eza, see eza-community/eza#227. |
It’s been merged in eza! |
I started investigating the handling of timezones and the
TZ
environment variable for #712.Turns out documentation on this matter is a sad joke and I had to read glibc (tzset.c and tzfile.c) and musl source code. Here’s what I discovered:
TZ
indicates a UTC timezoneTZ
starts with:
, the character is removed from the start of the stringTZ
is an absolute path (starts with/
), it uses the file directlyTZDIR
, or/usr/share/zoneinfo
if it doesn’t exist/usr/share/zoneinfo/
, then/share/zoneinfo/
, then/etc/zoneinfo/
.Note 1:
TZDIR
is used by NixOS (it’s not documented anywhere but there are uses in their codebase…).Note 2: At least one Linux distribution is using
/etc/zoneinfo
, apparently withoutTZDIR
because it uses musl.The text was updated successfully, but these errors were encountered: