by masklinn · 1w ago · 0 comments
While not necessarily wrong, it should probably be a separate library entirely: there are projects maintaining GIS boundaries for the IANA timezones.
I found the icu::TimeZoneNames class. The docstring even describes my exact problem:
> For example, people in the United States refer the zone used by the east part of North America as "Eastern Time". The tz database contains multiple time zones "America/New_York", "America/Detroit", "America/Montreal" and some others that belong to "Eastern Time". However, assigning different display names to these time zones does not make much sense for most of people.
I then looked at the icu::TimeZoneNames::find member function and it seemed to do exactly what I proposed. https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/clas... Except it’s marked as internal use only. I don’t know what’s going on.