We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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_timezone_location does not render correctly the ZoneInfo objects. These are part of python as of python 3.9 (and available as backport).
get_timezone_location
MCVE: $ pip install backports.zoneinfo babel
$ pip install backports.zoneinfo babel
# tz.py from babel.dates import get_timezone_location from backports import zoneinfo import pytz ams_native = zoneinfo.ZoneInfo("Europe/Amsterdam") ams_pytz = pytz.timezone("Europe/Amsterdam") print(get_timezone_location(ams_pytz)) # output: "Netherlands Time" print(get_timezone_location(ams_native)) # output: "Unknown Region (CEST) Time"
Python version: 3.6.11 babel version: 2.8.0
I think this can be easily fixed by checking the timezone.key attribute. Shall I make a PR?
timezone.key
The text was updated successfully, but these errors were encountered:
Please do! :)
Sorry, something went wrong.
Handle ZoneInfo objects in get_timezone_location, get_timezone_name (#…
5315341
…741) Fixes #740
Successfully merging a pull request may close this issue.
get_timezone_location
does not render correctly the ZoneInfo objects. These are part of python as of python 3.9 (and available as backport).MCVE:
$ pip install backports.zoneinfo babel
Python version: 3.6.11
babel version: 2.8.0
I think this can be easily fixed by checking the
timezone.key
attribute. Shall I make a PR?The text was updated successfully, but these errors were encountered: