srawlins / timezone

Time zone database and time zone aware DateTime object for Dart.
BSD 2-Clause "Simplified" License
100 stars 52 forks source link

Suggestion for Kiev/Kyiv mapping #190

Open mpastewski opened 3 months ago

mpastewski commented 3 months ago

Hi,

I want to bring to your attention the confusing, double spelling of the capital of Ukraine (Kiev/Kyiv). It was already mentioned here https://github.com/srawlins/timezone/issues/145

Please note that developers can use the flutter_timezone library to fetch the device's local timezone. That library returns (at least for Android) "Europe/Kiev". If that value is passed to the timezone library, the user receives the exception:

Unhandled Exception: Location with the name "Europe/Kiev" doesn't exist

That brings developers to handling corner cases in the app code, but that isn't the ideal scenario. I believe it would be great to recognize both spellings and map to the same timezone instead.

Best Regards, Mateusz

justerror commented 2 months ago

Hello.

I believe it would be great to recognize both spellings and map to the same timezone instead.

You can use database variant import 'package:timezone/data/latest_all.dart'. It contains deprecated name 'Europe/Kiev'.