From dddf0cb4b193917bcc2a283730609cae5a0f8600 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Thu, 9 Jan 2025 21:41:57 -0300 Subject: [PATCH] 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" --- roaring64/bsi64_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roaring64/bsi64_test.go b/roaring64/bsi64_test.go index 238b538e..125707f7 100644 --- a/roaring64/bsi64_test.go +++ b/roaring64/bsi64_test.go @@ -108,7 +108,7 @@ func TestSetAndGetBigTimestamp(t *testing.T) { bv, _ := bsi.GetBigValue(1) seconds, nanoseconds := bigIntToSecondsAndNanos(bv) ts := time.Unix(seconds, int64(nanoseconds)) - assert.Equal(t, "3024-10-23T16:55:46.763295273Z", ts.Format(time.RFC3339Nano)) + assert.Equal(t, "3024-10-23T16:55:46.763295273Z", ts.UTC().Format(time.RFC3339Nano)) assert.Equal(t, 67, bsi.BitCount()) }