You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a problem while using jdatetime related to comparing datetimes. The issue happens when the timezones of the two datetime objects are different.
I suggest changing the comparison methods in jdatetime.datetime to work like those in python datetime, so that timezone differences are considered. If this is acceptable, I would be happy to submit a pull request.
Thanks.
Runtime Information
jdatetime version: jdatetime-5.0.0
Python version: python 3.11
OS: Ubuntu
The text was updated successfully, but these errors were encountered:
mobinghoveoud
changed the title
Datetime omparison bug with different timezones
Datetime comparison bug with different timezones
Oct 25, 2024
Hi,
I ran into a problem while using
jdatetime
related to comparing datetimes. The issue happens when the timezones of the two datetime objects are different.How to Reproduce the Issue:
code:
Output:
The result should be
False
, but it showsTrue
.Proposed Solution:
I suggest changing the comparison methods in
jdatetime.datetime
to work like those in python datetime, so that timezone differences are considered. If this is acceptable, I would be happy to submit a pull request.Thanks.
Runtime Information
The text was updated successfully, but these errors were encountered: