datastore: civil package types are loaded incorrectly when local machine timezone is not UTC #3360
Labels
api: datastore
Issues related to the Datastore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
Datastore
Environment
Any
Go Environment
$ go version
go version go1.14.12 darwin/amd64
$ go env
[I believe this is unrelated.]
Code
The pre-existing TestLoadToInterface test fails when run on a machine that has a timezone set to a non UTC timezone.
Also, the
TestLoadToInterface/struct_with_civil.Date
would fail when run on a machine set to Pacific time if the test timestamp was 1605504600 (11/16/2020 @ 5:30am UTC) instead of 1605474000 (11/15/2020 @ 9:00pm UTC).Expected behavior
I would expect the above tests to pass when run on a machine with any non-UTC timezone.
Actual behavior
(Also note the comment above about how
TestLoadToInterface/struct_with_civil.Date
also fails under some circumstances).Additional context
I left a common on #3202 with information about how the loading can be corrected.
cc @codyoss
The text was updated successfully, but these errors were encountered: