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

Timestamp: Handle datetime aware and naives #1057

Closed
dzen opened this issue Dec 17, 2015 · 1 comment
Closed

Timestamp: Handle datetime aware and naives #1057

dzen opened this issue Dec 17, 2015 · 1 comment

Comments

@dzen
Copy link

dzen commented Dec 17, 2015

Hello,
for what I can see (in python for instance) a Timestamp "type" can be used to store a date into a protobuf message.
But the problem is that we miss the timezone of the stored instance, and we can have date manipulation bugs …

Is it an implementation choice to not take in account the timezone ? and assume the date is in UTC ?

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Dec 17, 2015

Quote from the timestamp.proto

// A Timestamp represents a point in time independent of any time zone
// or calendar, represented as seconds and fractions of seconds at
// nanosecond resolution in UTC Epoch time

It's by design that timezone info is not stored in the Timestamp message. If you need the timezone info, you can store it in a separate field.

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