Get long timezone instead of three letter
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?
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();
I have this problem on the Android Emulator, too. I had to explicitly set a timezone in the device settings, otherwise "GMT" is returned.
The emulator seems to return different timezone names than the real device (when I have tested it anyway).
This also occurs when we upload our app to Browserstack for testing.
Do you know if there is a way to get the full timezone name from the system in these cases? Seems to be an issue with how the emulators setup the timezone, possibly tied to how they get out of the machine itself. This was the only call I could see that would get the timezone at the OS level?
On Tue, 25 May 2021 at 08:21, James Dixon @.***> wrote:
This also occurs when we upload our app to Browserstack for testing.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pinkfish/flutter_native_timezone/issues/15#issuecomment-847963353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMJDQBQAB3KD4A5ENDDTPO6APANCNFSM4RCROZMA .
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...