This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ajaksu2
Recipients ajaksu2, huonw
Date 2021-12-24.03:29:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640316591.39.0.329650172593.issue46169@roundup.psfhosted.org>
In-reply-to
Content
Confirmed for 3.11 in Windows. 

The C datetime code can be trivially fixed so your equality test returns True, but there are two Python tests that depend on current behavior so it might not be so easy. They were added with current code in issue 24773, to implement PEP 495 -- Local Time Disambiguation.

Also, using a timezone implementation from the test suite makes the equality work, so maybe the bug depends on zoneinfo.

If you change datetimemodule.c line 5761 from "diff = 1;" to "diff = 0;", two tests fail and your code works.

See attached file for the tests that fail and using the timezone implementation mentioned above.
History
Date User Action Args
2021-12-24 03:29:51ajaksu2setrecipients: + ajaksu2, huonw
2021-12-24 03:29:51ajaksu2setmessageid: <1640316591.39.0.329650172593.issue46169@roundup.psfhosted.org>
2021-12-24 03:29:51ajaksu2linkissue46169 messages
2021-12-24 03:29:50ajaksu2create