Open mleonhard opened 3 years ago
Hi @mleonhard, On Android, I have selected Region "United States" and Time zone "Chicago (GMT-05:00)" in the device settings on the emulator.
_timezone = await FlutterNativeTimezone.getLocalTimezone(); # returns "America/Chicago"
I need to know if it returns ambiguous time zone abbreviations like "CST" or excellent tz database names like "America/Chicago". To answer your question, the library returns excellent tz database names.
For newer android is returns things in IANA format using the ZoneID lookup. The older TimeZone package returns things like CST and PST in some cases, I think those cases are mostly related to running in an emulator though, not seen it return those strings in real settings.
On Thu, 10 Jun 2021 at 08:30, Eric Bartholemy @.***> wrote:
Hi @mleonhard https://github.com/mleonhard, On Android, I have selected Region "United States" and Time zone "Chicago (GMT-05:00)" in the device settings.
_timezone = await FlutterNativeTimezone.getLocalTimezone(); # returns "America/Chicago"
I need to know if it returns ambiguous time zone abbreviations like "CST" or excellent tz database names like "America/Chicago". To answer your question, the library returns excellent tz database names.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pinkfish/flutter_native_timezone/issues/26#issuecomment-858721769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMJ7G6XFUUYVQQTB6QTTSDLAPANCNFSM455IQYGQ .
@pinkfish So now this package always returns IANA
format? Agree it would be great to document this.
The docs for
Future<String> getLocalTimezone()
say only:I need to know if it returns ambiguous time zone abbreviations like "CST" or excellent tz database names like "America/Chicago".