Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking interface by returning pytz objects #79

Open
iartarisi opened this issue Feb 10, 2016 · 1 comment
Open

Breaking interface by returning pytz objects #79

iartarisi opened this issue Feb 10, 2016 · 1 comment

Comments

@iartarisi
Copy link

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')

@myusuf3
Copy link
Owner

myusuf3 commented Feb 16, 2016

This is a good point, let me see what we can do here. @mlew thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants