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

Test assumes system timezone is UTC #3720

Closed
szokeasaurusrex opened this issue Oct 31, 2024 · 2 comments · Fixed by #3722
Closed

Test assumes system timezone is UTC #3720

szokeasaurusrex opened this issue Oct 31, 2024 · 2 comments · Fixed by #3722
Assignees
Labels
Component: Tests Dealing with tests

Comments

@szokeasaurusrex
Copy link
Member

szokeasaurusrex commented Oct 31, 2024

This test, added in #3546, assumes that the system time is UTC. The test fails otherwise because Python interprets the timestamp as if it is using the system's local timezone, but we assert that it is interpreted in UTC.

@BYK
Copy link
Member

BYK commented Oct 31, 2024

@szokeasaurusrex thanks for the report! Can you share which Python version this occurs on as I was not on UTC when I was writing this test and the point of the test was to make sure it worked on non-UTC timezone settings.

I'm assuming the culprit is us trying fromisoformat() first which defaults to local timezone when there's no timezone set.

@BYK BYK self-assigned this Oct 31, 2024
@BYK BYK added the Component: Tests Dealing with tests label Oct 31, 2024
@szokeasaurusrex
Copy link
Member Author

@BYK I think it was 3.12

BYK added a commit that referenced this issue Oct 31, 2024
BYK added a commit that referenced this issue Oct 31, 2024
@BYK BYK closed this as completed in #3722 Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Tests Dealing with tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants