Skip to content

Datastore - Timestamp Precision #1974

Description

@sai-pullabhotla

With the latest changes made to the Datastore API where DateTimeValue/DateTime have been replaced by TimestampValue and Timestamp - I have a few questions on the Timestamp precision:

What is the precision of DATETIME/TIMESTAMP data type in the Cloud Datastore? This document says it is milliseconds. Where as this GQL Reference document gives the impression that it is microseconds. The Timestamp object itself supports nanoseconds precision. The Datastore Console shows milliseconds precision.

However, I was able to store a Timestamp with nanos into the Datastore, which when read back comes back with microseconds precision. So, the precision is silently dropped by the API.

Can some one confirm if if the data type precision is microseconds? If it is Microseconds, should the Datastore Console show the microseconds?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions