0
0
Fork 0

change to always return stored fields in UTC

This commit is contained in:
Marty Schoch 2014-11-26 15:36:34 -05:00
parent 62277f82a9
commit 453d4cf770
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ func (n *DateTimeField) DateTime() (time.Time, error) {
if err != nil {
return time.Time{}, err
}
return time.Unix(0, i64), nil
return time.Unix(0, i64).UTC(), nil
}
func (n *DateTimeField) GoString() string {

View File

@ -635,7 +635,7 @@ func TestIndexInsertUpdateDeleteWithMultipleTypesStored(t *testing.T) {
if err != nil {
t.Error(err)
} else {
if dateFieldDate != time.Unix(0, 0) {
if dateFieldDate != time.Unix(0, 0).UTC() {
t.Errorf("expected date value unix epoch, got %v", dateFieldDate)
}
}