Skip to content

Fix tz to UTC in test_time test #133109

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

StanFromIreland
Copy link
Contributor

Currently on DST, this causes:

======================================================================
FAIL: test_localtime_timezone (test.test_time.TestPytime.test_localtime_timezone)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stan/PycharmProjects/cpython/Lib/test/test_time.py", line 772, in test_localtime_timezone
    self.assertEqual(lt.tm_gmtoff, -[time.timezone, time.altzone][lt.tm_isdst])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 3600 != 0

----------------------------------------------------------------------
Ran 63 tests in 2.938s

FAILED (failures=1, skipped=3)
test test_time failed
0:00:02 load avg: 1.87 [1/1/1] test_time failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_time

Total duration: 3.0 sec
Total tests: run=63 failures=1 skipped=3
Total test files: run=1/1 failed=1
Result: FAILURE

@bedevere-app bedevere-app bot added awaiting review tests Tests in the Lib/test dir labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant