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
Panic with 0.4.20 on latest ArchLinux and Alpine #755
Comments
Sorry for the regression! Do Arch/Alpine store the tzdb somewhere else or do they not have it installed at all by default? |
It looks like this is happening while we're trying to read |
https://wiki.archlinux.org/title/System_time#Time_zone seems to suggest that Arch at least does put that in the usual place. https://stackoverflow.com/questions/68996420/how-to-set-timezone-inside-alpine-base-docker-image suggests Alpine also follows the usual process. |
Ah sorry, I've forgot to tell that I was in a Docker context.
Everything is ok now ! Sorry for the trouble! I will just check what to do with the ArchLinux image and report here for reference. Edit: exactly the same for ArchLinux, just |
I'm curious, what did you previously get as the local offset in that container? |
I don't know how to test it, I just run the latest On Alpine:
Then I add the
On ArchLinux:
On both Alpine and ArchLinux image, |
What's surprising (at least it's surprising to me), is that, if I install python3 on ArchLinux I can get access to |
I just ran into the same issue. With 0.4.20 What about having the code fall back to |
That's what I was wondering about, would be nice to check if that's the expected behavior for libc. |
I just tried version
I guess that's what we should aim for from a backwards compatibility perspective. EDIT: Sorry, for reproducibility, I should note that this is inside a pretty empty
|
I have the same issue in iOS and android,but in my demo test It‘s OK |
If anyone wants to start on a patch, I think you'll want to start here: https://github.com/chronotope/chrono/blob/main/src/offset/local/unix.rs#L51 If not, @esheppa or I will get around to it soon. |
@djc is there interest in delegating this logic to https://docs.rs/iana-time-zone/latest/iana_time_zone/ instead of hand rolling this in chrono? |
I thought you were on a dependency reducing spree? 😛 I don't think bringing in dependencies is the solution here, see @esheppa's linked PR. |
I also get this on Android (not iOS emulator!):
|
I'm hitting this in Termux builds on my Android as well. I'm not familiar with the change or the justification, but it's worth noting that time zone info does not exist on every system. Think about minimal docker containers and such. Chrono should work in the absence of time zone info. Probably the best thing to do is default to UTC. |
Due to a bug in the chrono library: chronotope/chrono#755
Due to a bug in the chrono library: chronotope/chrono#755
- *Cf.* microsoft/azurelinux#3483. - chrono released v0.4.20 which has broken running tarpaulin. Upstream issue: chronotope/chrono#755.
Chrono release 0.4.20 introduced a bug that manifests when the timezone is not set. chronotope/chrono#755 Signed-off-by: Ryan Beck-Buysse <rbuysse@bitwise.io>
Hi there, we're experiencing the same problem. We are building dockers with JIB, which is probably the reason we have no access to /etc/localtime. |
We have merged #756 as a partial fix for this. The following cases should be fixed:
The following cases are likely still broken:
|
The Linux and Android fixes are now available on crates.io as part of the 0.4.21 release. |
## Issue Addressed I think we're running into this in our linkcheck, so I'm going to frist verify linkcheck fails on the current version, and then try downgrading it to see if it passes chronotope/chrono#755 Co-authored-by: realbigsean <sean@sigmaprime.io>
## Issue Addressed I think we're running into this in our linkcheck, so I'm going to frist verify linkcheck fails on the current version, and then try downgrading it to see if it passes chronotope/chrono#755 Co-authored-by: realbigsean <sean@sigmaprime.io>
## Issue Addressed I think we're running into this in our linkcheck, so I'm going to frist verify linkcheck fails on the current version, and then try downgrading it to see if it passes chronotope/chrono#755 Co-authored-by: realbigsean <sean@sigmaprime.io>
With
chrono 0.4.20
, usinglet now: DateTime<Local> = Local::now();
results in a panic.Repro step:
$ docker run -it archlinux
$ pacman -Sy rust
The text was updated successfully, but these errors were encountered: