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
It looks like we cannot recreate a Timezone instance from all the timezones shortcodes:
>>> pendulum.timezone("Europe/Paris").tzname(dt) 'CET' >>> pendulum.timezone("CET") Timezone('CET') >>> pendulum.timezone("America/New_York").tzname(dt) 'EDT' >>> pendulum.timezone("EDT") Traceback (most recent call last): File "/-env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/reader.py", line 50, in read_for file_path = pytzdata.tz_path(timezone) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/env/lib/python3.11/site-packages/pytzdata/__init__.py", line 74, in tz_path raise TimezoneNotFound('Timezone {} not found at {}'.format(name, filepath)) pytzdata.exceptions.TimezoneNotFound: Timezone EDT not found at /env/lib/python3.11/site-packages/pytzdata/zoneinfo/EDT During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/env/lib/python3.11/site-packages/pendulum/tz/__init__.py", line 37, in timezone tz = _Timezone(name, extended=extended) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/-env/lib/python3.11/site-packages/pendulum/tz/timezone.py", line 40, in __init__ tz = read(name, extend=extended) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/__init__.py", line 9, in read return Reader(extend=extend).read_for(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/reader.py", line 52, in read_for raise InvalidTimezone(timezone) pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "EDT"
related: apache/airflow#34483
The text was updated successfully, but these errors were encountered:
@hussein-awala, hi. Try use Eastern Standard Time (EST): pendulum.timezone("EST") instead of pendulum.timezone("EDT")
pendulum.timezone("EST")
pendulum.timezone("EDT")
Sorry, something went wrong.
Also check this post, there are reasons why EDT and other can not in timezones
No branches or pull requests
Issue
It looks like we cannot recreate a Timezone instance from all the timezones shortcodes:
related: apache/airflow#34483
The text was updated successfully, but these errors were encountered: