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

lost timezone #64

Closed
newbery opened this issue May 9, 2016 · 2 comments
Closed

lost timezone #64

newbery opened this issue May 9, 2016 · 2 comments

Comments

@newbery
Copy link

newbery commented May 9, 2016

In dropbox.babel_serializers.js, it appears that the UTC/GMT timezone in the original datetime string is lost during the conversion of a Timestamp value to python object,

    if isinstance(data_type, bv.Timestamp):
        try:
            return datetime.datetime.strptime(val, data_type.format)
        except ValueError as e:
            raise bv.ValidationError(e.args[0])
@braincore
Copy link
Contributor

That's correct. The Dropbox server, however, only ever sends UTC timestamps.

@newbery
Copy link
Author

newbery commented May 25, 2016

Perhaps it might be helpful to add something in the documentation to warn users of this sdk that a naive datetime is returned and maybe some hint on how to reapply the UTC/GMT timezone to make it "aware" again? The current documentation can easily mislead one into believing that you would be getting a timezone aware datetime.

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