Skip to content

Commit dddf0cb

Browse files
committed
roaring64: fix TestSetAndGetBigTimestamp (non-UTC)
The test was broken if local timezone it not UTC. For example, in timezone UTC-03:00 it failed with this error: --- FAIL: TestSetAndGetBigTimestamp (0.00s) bsi64_test.go:111: Error Trace: bsi64_test.go:111 Error: Not equal: expected: "3024-10-23T16:55:46.763295273Z" actual : "3024-10-23T13:55:46.763295273-03:00"
1 parent fc14622 commit dddf0cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roaring64/bsi64_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestSetAndGetBigTimestamp(t *testing.T) {
108108
bv, _ := bsi.GetBigValue(1)
109109
seconds, nanoseconds := bigIntToSecondsAndNanos(bv)
110110
ts := time.Unix(seconds, int64(nanoseconds))
111-
assert.Equal(t, "3024-10-23T16:55:46.763295273Z", ts.Format(time.RFC3339Nano))
111+
assert.Equal(t, "3024-10-23T16:55:46.763295273Z", ts.UTC().Format(time.RFC3339Nano))
112112
assert.Equal(t, 67, bsi.BitCount())
113113
}
114114

0 commit comments

Comments
 (0)