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

fix: Disable very old date in timezone test for CI #18935

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,13 @@ def test_literal_from_date(
@pytest.mark.parametrize(
"value",
[
datetime(1677, 9, 22),
datetime(1677, 9, 22, tzinfo=ZoneInfo("EST")),
# Very old dates with a timezone like EST caused problems for the CI due
# to the IANA timezone database updating their historical offset, so
# these have been disabled for now. A mismatch between the timezone
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it likely that this mismatch will ever be solved and that's why the tests are commented out or would it be better to just delete the two old dates?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodrigogiraoserrao We might resolve it in the future by loading Python's timezone information instead of hard-baking chrono_tzs timezone database in Polars. And even if we never resolved it I still think it's better to leave the old dates with the explanation so that one in the future might not think to re-add old dates again to 'improve the test'.

# database that chrono_tz crate uses vs. the one that Python uses (which
# differs from platform to platform) will cause this to fail.
# datetime(1677, 9, 22),
# datetime(1677, 9, 22, tzinfo=ZoneInfo("EST")),
datetime(1970, 1, 1),
datetime(1970, 1, 1, tzinfo=ZoneInfo("EST")),
datetime(2024, 2, 29),
Expand Down
Loading