Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: impl/prod/raw_datastore_type_converter.go

Issue 1298423005: prod: fix timezone conversion from AppEngine layer (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | service/datastore/properties.go » ('j') | service/datastore/properties.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/raw_datastore_type_converter.go
diff --git a/impl/prod/raw_datastore_type_converter.go b/impl/prod/raw_datastore_type_converter.go
index 022ae04fe8f8df58c582d09e4968ba372cf79291..0543326492c450ebe6e665b180d17ed741b82f1c 100644
--- a/impl/prod/raw_datastore_type_converter.go
+++ b/impl/prod/raw_datastore_type_converter.go
@@ -5,6 +5,8 @@
package prod
import (
+ "time"
+
bs "github.com/luci/gae/service/blobstore"
ds "github.com/luci/gae/service/datastore"
"google.golang.org/appengine"
@@ -30,6 +32,9 @@ func (tf *typeFilter) Load(props []datastore.Property) error {
val = bs.Key(x)
case appengine.GeoPoint:
val = ds.GeoPoint(x)
+ case time.Time:
+ // "appengine" layer instantiates with Local timezone.
iannucci 2015/08/19 21:55:26 seriously wtf
+ val = x.UTC()
}
prop := ds.Property{}
is := ds.ShouldIndex
« no previous file with comments | « no previous file | service/datastore/properties.go » ('j') | service/datastore/properties.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698