delorean
delorean copied to clipboard
Breaking interface by returning pytz objects
Trying to parse a string and get its timezone returns a pytz object.
>>> type(delorean.parse('2016-02-10T14:32:44.773558').timezone)
<class 'pytz.UTC'>
I think Delorean shouldn't expose its implementation by returning objects from its dependencies like that. Also think I shouldn't have to import pytz in order to compare it against the Delorean object.
I'd be fine with just being able to do from delorean import utc
or even from delorean import timezone; utc = timezone('UTC')
This is a good point, let me see what we can do here. @mlew thoughts?