myusuf3 / delorean

Delorean: Time Travel Made Easy
http://delorean.rtfd.org/
MIT License
1.84k stars 128 forks source link

__eq__ should return True for datetimes that are UTC equal #61

Closed mlew closed 9 years ago

mlew commented 9 years ago

Delorean should know if two times are UTC equal. The following code will return False:

>>> d1 = Delorean(datetime(2015, 1, 1), timezone='US/Pacific')
>>> d2 = Delorean(datetime(2015, 1, 1, 8), timezone='UTC')
>>> d1 == d2
False

The two times are actually equivalent, so it seems like the above code should return True. Maybe this is working as intended, but I was unable to find any documentation supporting that decision.

myusuf3 commented 9 years ago

Will close issue once corresponding documentation comes in. :+1: