Skip to content

Commit b90d067

Browse files
authored
Merge pull request #23 from upfluence/sp-true-utc
Fix utc time location
2 parents 2534234 + 0c3e896 commit b90d067

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sqltypes/null_utc_time.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (nut *NullUTCTime) Scan(v interface{}) error {
1919
}
2020

2121
nut.Valid = nt.Valid
22-
nut.Time = time.Unix(nt.Time.UTC().Unix(), 0)
22+
nut.Time = time.Unix(nt.Time.UTC().Unix(), 0).UTC()
2323

2424
return nil
2525
}

sqltypes/null_utc_time_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestNullUTCTime_Scan(t *testing.T) {
4545
var n = NullUTCTime{}
4646

4747
tt.errFn(t, n.Scan(tt.value))
48-
assert.Equal(t, tt.want.Unix(), n.Time.Unix())
48+
assert.Equal(t, tt.want, n.Time)
4949
})
5050
}
5151
}

0 commit comments

Comments
 (0)