Skip to content

Timestamp: Handle datetime aware and naives #1057

Closed

Description

@dzen

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 ?

Activity

  1. xfxyjwf commented on Dec 17, 2015

    @xfxyjwf
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions