GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore - Timestamp Precision · Issue #1974 · googleapis/google-cloud-java

Datastore - Timestamp Precision #1974

New issue
Copy link
New issue
Copy link
Closed
Closed
Datastore - Timestamp Precision#1974
Copy link
Assignees
jabubake
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.

Description

@sai-pullabhotla
sai-pullabhotla
opened on Apr 24, 2017
Issue body actions

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

  1. garrettjonesgoogle
    added
    api: datastoreIssues related to the Datastore API.
    type: questionRequest for information or clarification. Not an issue.
    on Apr 28, 2017
  2. pongad commented on May 1, 2017

    @pongad
    pongad
    on May 1, 2017
    Contributor
    More actions

    @jabubake Can you help with discrepancies between the two linked docs (both on Google cloud website)? Then we should clarify in docs that the API does not return the full nanosec precision supported by Timestamp.

  3. pongad
    assigned
    jabubake
    on May 1, 2017
  4. pongad commented on May 3, 2017

    @pongad
    pongad
    on May 3, 2017
    Contributor
    More actions

    I synced with @jabubake offline. There are differences between the query language and the Datastore service.

    The query language itself supports microsec-precision. However, the Datastore service only supports up to millisec-precision, so when the value "goes through" the service, only millisecs are retained. The same happens to the data types you mentioned.

    Jisha can correct me if I misunderstand.

    This should be documented in JavaDoc somewhere. I'll leave this issue open to track it.

  5. sai-pullabhotla commented on May 5, 2017

    @sai-pullabhotla
    sai-pullabhotla
    on May 5, 2017
    Author
    More actions

    Just a quick note - I was able to store and retrieve microseconds from Datastore using the Java API, so I believe the Datastore does support up to micros. However, the GCD Console always hows millis precision.

  6. shinfan
    added
    docs
    on May 8, 2017
  7. shinfan commented on May 8, 2017

    @shinfan
    shinfan
    on May 8, 2017
    Contributor
    More actions

    @garrettjonesgoogle @pongad I am not sure if "documentation" works well for issues like this. It is misleading that Timestamp allows nanoseconds but Datastore only preserves microseconds. I feel we should avoid these incorrect impressions at the first place.

  8. tcoffee-google
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on May 22, 2017
  9. garrettjonesgoogle commented on Aug 11, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Aug 11, 2017
    Contributor
    More actions

    @shinfan I think documentation is the best we can do here if we are using a shared type.

  10. garrettjonesgoogle
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    and removed
    type: questionRequest for information or clarification. Not an issue.
    on Aug 14, 2017
  11. yihanzhen commented on Jan 11, 2018

    @yihanzhen
    yihanzhen
    on Jan 11, 2018
    Contributor
    More actions

    This has been added to the feature backlog: https://github.com/GoogleCloudPlatform/google-cloud-java/wiki/Feature-backlog . This issue will be closed but is linked in the backlog and can continue to be used for comment and discussion.

  12. yihanzhen
    closed this as completedon Jan 11, 2018
  13. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(main): release 2.32.2 (#1974)

    a74c753
  14. chingor13
    added 2 commits that reference this issue on Feb 20, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    8e2c1e3

    chore(main): release 2.31.0 (#1979)

    a1734e7
  15. lqiu96
    added a commit that references this issue on Mar 20, 2026

    chore(main): release 2.32.2 (#1974)

    7503afb
  16. suztomo
    added a commit that references this issue on Mar 23, 2026

    test: test cause of BatchUpdateException (googleapis#1974)

    77c8994
  17. meltsufin
    added a commit that references this issue on May 2, 2026

    chore: Update generation configuration at Sat Jan 11 02:25:24 UTC 2025 (

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

Metadata

Metadata

Assignees

  • @jabubake
    jabubake

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.