Skip to content
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

exa does not read TZ in 0.10.1 #1047

Closed
fkarg opened this issue Mar 23, 2022 · 8 comments
Closed

exa does not read TZ in 0.10.1 #1047

fkarg opened this issue Mar 23, 2022 · 8 comments

Comments

@fkarg
Copy link

fkarg commented Mar 23, 2022

It seems to me the issue from #453 (not reading the TZ variable) reoccurred. If not, please tell me if/what I can do.

Somehow this is doubly weird, as the fallback /etc/localtime does exist. See for yourself:

pars@artus ~/text_zeug (master)> exa -lahF
Unable to determine time zone: No such file or directory (os error 2)
Permissions Size User Date Modified Name
drwxr-xr-x     - pars 19 Mar 14:19  .git/
.rw-r--r--     0 pars 19 Mar 14:19  .git-blame-ignore-revs
...
    omitted
...

pars@artus ~/text_zeug (master)> echo $TZ
Europe/Berlin

pars@artus ~/text_zeug (master)> exa --version
exa - list files on the command-line
v0.10.1 [+git]
https://the.exa.website/

pars@artus ~> exa -lahF /etc/localtime 
Unable to determine time zone: No such file or directory (os error 2)
Permissions Size User Date Modified Name
lrwxrwxrwx    27 root 22 Mar 07:44  /etc/localtime -> /etc/zoneinfo/Europe/Berlin

OS: NixOS 21.11, installed exa through cargo

Configuration can be found at configs, machine is artus.

@ariasuni
Copy link
Collaborator

Will be fixed by #867, probably. Do you have access to /usr/share/zoneinfo/Europe/Berlin?

@fkarg
Copy link
Author

fkarg commented Mar 26, 2022

there's just bin in /usr

@ariasuni
Copy link
Collaborator

ariasuni commented Mar 26, 2022

Ah sorry I misread, on your machine /etc/localtime -> /etc/zoneinfo/Europe/Berlin, so exa needs to access /etc/zoneinfo, not /usr/share/zoneinfo.

@fkarg
Copy link
Author

fkarg commented Mar 26, 2022

Well, it's like that:

lrwxrwxrwx    20 root 22 Mar 07:44  zoneinfo -> /etc/static/zoneinfo/

and

.r--r--r--  2.3k root  1 Jan  1970  /etc/zoneinfo/Europe/Berlin

but I can totally just cat/access them, no root required.

@ariasuni
Copy link
Collaborator

ariasuni commented Mar 26, 2022

Ah well yeah, the reason is very simple: exa reads TZ and if it’s a relative path, it checks only in /usr/share/zoneinfo/. Your problem can be fixed temporarily either by setting TZ to an absolute path, or unsetting it so that it fallbacks on /etc/localtime. And my PR will definitely fix that for good.

@fkarg
Copy link
Author

fkarg commented Mar 27, 2022

Unsetting it would degrade usability of other tools -- would setting it to an absolute path have downsides?

@ariasuni
Copy link
Collaborator

I don’t think so, it seems to be well supported by both glibc and musl, but I never used this feature, so I guess you should try and see if it causes any problem.

@ariasuni
Copy link
Collaborator

Closing this, since exa is unmaintained (see #1243), and this has (finally 🎉) fixed in the active fork eza!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants