myusuf3 / delorean

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

Comparing Delorean objects returns incorrect results #30

Closed JustinAzoff closed 11 years ago

JustinAzoff commented 11 years ago

Comparing two Delorean objects returns incorrect results:

>>> ends = Delorean(datetime.datetime(2013,4,21,16,00,00),timezone="UTC")
>>> now = Delorean()
>>> print now;print ends
Delorean(datetime=2013-04-21 15:24:15.599940+00:00, timezone=UTC)
Delorean(datetime=2013-04-21 16:00:00+00:00, timezone=UTC)
>>> now < ends
False
>>> now.epoch() < ends.epoch()
True

I suppose the bigger issue here is that it even does it rather than complain that it is not implemented.

myusuf3 commented 11 years ago

this has been resolved in 0.2.1 Thanks for the heads up! https://pypi.python.org/pypi/Delorean