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

Datetimes are not timezone aware #6

Open
davidfischer opened this issue Feb 27, 2013 · 2 comments
Open

Datetimes are not timezone aware #6

davidfischer opened this issue Feb 27, 2013 · 2 comments

Comments

@davidfischer
Copy link
Contributor

Since the timezone is specified in the parsed datetime, the datetime should have the timezone (UTC) specified.

@bryant
Copy link
Owner

bryant commented Feb 27, 2013

Not sure about this, because in the context of TOML, every timestamp value is assured to be Z. So it feels right for the tzinfo of our datetime objects to be singleton, i.e., locked to None.

For some perspective, PyYAML does the same:

>>> import yaml
>>> print yaml.load('- 2001-12-15T02:59:23Z')[0].tzinfo
None

@davidfischer
Copy link
Contributor Author

I can understand your hesitation. If you read this and you still think that assuming UTC is correct, then feel free to close this. I just try to avoid naive datetimes as much as possible.

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