Fix test failure when DB and client are not in the same time zone

Explicitly set the time zone to UTC in the database and in the
test expectation. Then compare the two times in the client-local
time zone.
pull/193/head
Nathaniel Waisbrot 2016-10-03 08:45:41 -04:00
parent ed2ab0a129
commit c14c63d63c
No known key found for this signature in database
GPG Key ID: 75FFF87BD3EEA0CA
1 changed files with 2 additions and 2 deletions

View File

@ -1095,11 +1095,11 @@ func TestRowDecode(t *testing.T) {
expected []interface{}
}{
{
"select row(1, 'cat', '2015-01-01 08:12:42'::timestamptz)",
"select row(1, 'cat', '2015-01-01 08:12:42-00'::timestamptz)",
[]interface{}{
int32(1),
"cat",
time.Date(2015, 1, 1, 8, 12, 42, 0, time.Local),
time.Date(2015, 1, 1, 8, 12, 42, 0, time.UTC).Local(),
},
},
}