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
import datetime
import deepdiff
a = datetime.timezone.utc
b = datetime.timezone(datetime.timedelta(hours=1))
c = datetime.timezone(datetime.timedelta(hours=2))
d = datetime.timezone(datetime.timedelta(hours=1))
deepdiff.DeepDiff(a, b)
Out: {}
a == b
Out: False
deepdiff.DeepDiff(a, c)
Out: {}
a == c
Out: False
deepdiff.DeepDiff(b, c)
Out: {}
b == c
Out: False
b == d
Out: True
deepdiff.DeepDiff(b, d)
Out: {} # as expected
Expected behavior
DeepDiff of each distinct pair of a, b, c should be non-empty.
OS, DeepDiff version and Python version (please complete the following information):
OS: Mac OS
Version 14.4.1
Python Version 3.12.12
DeepDiff Version 7.0.1
The text was updated successfully, but these errors were encountered:
DeepDiff reports all datetime timezones as equal
Expected behavior
DeepDiff of each distinct pair of a, b, c should be non-empty.
OS, DeepDiff version and Python version (please complete the following information):
The text was updated successfully, but these errors were encountered: