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

Get long timezone instead of three letter #15

Open
deadsoul44 opened this issue Sep 9, 2020 · 6 comments
Open

Get long timezone instead of three letter #15

deadsoul44 opened this issue Sep 9, 2020 · 6 comments

Comments

@deadsoul44
Copy link

I am calling an API with timezone parameter. However, timezone response from this library is three letter (e.g. GMT). But, the API is expecting long version timezone. Is there a way to specify this?

@scopendo
Copy link

If you're referring to the IANA time zone id, such as Europe/London, then I've been able to get that just by calling:

await FlutterNativeTimezone.getLocalTimezone();

@REKURDennis
Copy link

I have this problem on the Android Emulator, too. I had to explicitly set a timezone in the device settings, otherwise "GMT" is returned.

@pinkfish
Copy link
Owner

The emulator seems to return different timezone names than the real device (when I have tested it anyway).

@jamesdixon
Copy link

This also occurs when we upload our app to Browserstack for testing.

@pinkfish
Copy link
Owner

pinkfish commented May 25, 2021 via email

@pinkfish
Copy link
Owner

I switched the API to use ZoneId after looking around on the web a bit. Looks like this returns an iana timezone name more frequently...

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

5 participants