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

Respect TZDIR environment variable #1265

Open
pitdicker opened this issue Sep 7, 2023 · 0 comments · May be fixed by #1457
Open

Respect TZDIR environment variable #1265

pitdicker opened this issue Sep 7, 2023 · 0 comments · May be fixed by #1457

Comments

@pitdicker
Copy link
Collaborator

The TZDIR variable can be set to override the path to the time zone database, at least in glibc. See ogham/exa#856.

We should also merge the two places where we define the search dirs.
Local/unix.rs:

#[cfg(target_os = "aix")]
const TZDB_LOCATION: &str = "/usr/share/lib/zoneinfo";

#[cfg(not(any(target_os = "android", target_os = "aix")))]
const TZDB_LOCATION: &str = "/usr/share/zoneinfo";

And local/tz_info/timezone.rs:

#[cfg(unix)]
const ZONE_INFO_DIRECTORIES: [&str; 4] =
    ["/usr/share/zoneinfo", "/share/zoneinfo", "/etc/zoneinfo", "/usr/share/lib/zoneinfo"];
@pitdicker pitdicker linked a pull request Feb 24, 2024 that will close this issue
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.

1 participant