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

fix(datastore): Ensure the datastore time is returned as UTC #3521

Merged
merged 10 commits into from Jan 13, 2021

Conversation

crwilcox
Copy link
Contributor

No description provided.

@crwilcox crwilcox requested review from tritone and a team as code owners January 11, 2021 17:52
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 11, 2021
@product-auto-label product-auto-label bot added the api: datastore Issues related to the Datastore API. label Jan 11, 2021
datastore/load.go Outdated Show resolved Hide resolved
@@ -369,7 +369,7 @@ func setVal(v reflect.Value, p Property) (s string) {
if ok {
s := micros / 1e6
ns := micros % 1e6
v.Set(reflect.ValueOf(time.Unix(s, ns)))
v.Set(reflect.ValueOf(time.Unix(s, ns).In(time.UTC)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a test that ensures the times are returned in UTC?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, might be easier said than done though :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test added.

Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

datastore/load_test.go Outdated Show resolved Hide resolved
datastore/load_test.go Outdated Show resolved Hide resolved
datastore/load_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tbpg tbpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@crwilcox crwilcox merged commit 0e659e2 into googleapis:master Jan 13, 2021
@crwilcox crwilcox deleted the ensure-UTC branch October 29, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants