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

Local timezones broken on Android #922

Closed
dae opened this issue Dec 23, 2022 · 3 comments
Closed

Local timezones broken on Android #922

dae opened this issue Dec 23, 2022 · 3 comments

Comments

@dae
Copy link

dae commented Dec 23, 2022

Unfortunately it seems like #756 did not fix timezone determination on Android - UTC is being returned instead.

Part of the problem might be the leading space in the filename:

https://github.com/chronotope/chrono/pull/756/files#diff-568a8cdf0e0b7a4922b13d27771df35ac8e561ac9f25c5229263120edc171486R100

A bigger problem though is that individual files don't appear to be available - /system/usr/share/zoneinfo appears to have all data packed into a binary tzdata file, so Chrono will presumably need to be able to parse it. Some Googling reveals the format: https://android.googlesource.com/platform/libcore/+/jb-mr2-release/luni/src/main/java/libcore/util/ZoneInfoDB.java#38, https://go.dev/src/time/zoneinfo_android.go

@talhazengin
Copy link

The problem still continues. Is there a plan to make a fix for this?

@djc
Copy link
Contributor

djc commented Feb 26, 2023

There is not, but we'd love if someone wants to contribute code to make it work.

@pitdicker
Copy link
Collaborator

Fixed in #978.

@djc djc closed this as completed Jun 6, 2023
MarkusPettersson98 added a commit to mullvad/mullvadvpn-app that referenced this issue Jun 21, 2023
Fix time zone being ignored on Android, incorrectly outputting UTC
timestamps. This more recent version of `chrono` extracts timezone info
from a tzdata file on Android.

This issue is recognized in `chrono`'s issue tracker:
chronotope/chrono#922
MarkusPettersson98 added a commit to mullvad/mullvadvpn-app that referenced this issue Jun 27, 2023
Fix time zone being ignored on Android, incorrectly outputting UTC
timestamps. This more recent version of `chrono` extracts timezone info
from a tzdata file on Android.

This issue is recognized in `chrono`'s issue tracker:
chronotope/chrono#922
MarkusPettersson98 added a commit to mullvad/mullvadvpn-app that referenced this issue Jun 27, 2023
Fix time zone being ignored on Android, incorrectly outputting UTC
timestamps. This more recent version of `chrono` extracts timezone info
from a tzdata file on Android.

This issue is recognized in `chrono`'s issue tracker:
chronotope/chrono#922
pinkisemils pushed a commit to mullvad/mullvadvpn-app that referenced this issue Jun 27, 2023
Fix time zone being ignored on Android, incorrectly outputting UTC
timestamps. This more recent version of `chrono` extracts timezone info
from a tzdata file on Android.

This issue is recognized in `chrono`'s issue tracker:
chronotope/chrono#922
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

No branches or pull requests

4 participants