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
Conversation
@@ -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))) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.