Skip to content
New issue

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

BUG: pytz.exceptions.UnknownTimeZoneError: 'US/Eastern' #2979

Closed
3 tasks done
sebastic opened this issue Aug 11, 2023 · 1 comment · Fixed by #2981
Closed
3 tasks done

BUG: pytz.exceptions.UnknownTimeZoneError: 'US/Eastern' #2979

sebastic opened this issue Aug 11, 2023 · 1 comment · Fixed by #2981
Labels

Comments

@sebastic
Copy link

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of geopandas.

  • (optional) I have confirmed this bug exists on the main branch of geopandas.


Problem description

tzdata (2023c-8) in Debian no longer provides the US timezones:

  * Ship only timezones in tzdata that follow the current rules of geographical
    region (continent or ocean) and city name. Move all legacy timezone symlinks
    (that are upgraded during package update) to tzdata-legacy. This includes
    dropping the special handling for US/* timezones. (Closes: #1040997)

This causes the test suite to fail with an exception:

pytz.exceptions.UnknownTimeZoneError: 'US/Eastern'

Using America/New_York instead resolves the issue:

--- a/geopandas/io/tests/test_file.py
+++ b/geopandas/io/tests/test_file.py
@@ -184,7 +184,7 @@ def test_to_file_bool(tmpdir, driver, ex


 TEST_DATE = datetime.datetime(2021, 11, 21, 1, 7, 43, 17500)
-eastern = pytz.timezone("US/Eastern")
+eastern = pytz.timezone("America/New_York")

 datetime_type_tests = (TEST_DATE, eastern.localize(TEST_DATE))
@jorisvandenbossche
Copy link
Member

@sebastic thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants