Skip to content

Commit 9def32c

Browse files
committed
update timestamp format to use UnixNano
1 parent be587ba commit 9def32c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

buffer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ func (b *buffer) TimestampColumn(name string, ts time.Time) *buffer {
553553
return b
554554
}
555555
b.WriteByte('=')
556-
b.writeInt(ts.UnixMicro())
557-
b.WriteByte('t')
556+
b.writeInt(ts.UnixNano())
557+
b.WriteByte('n')
558558
b.hasFields = true
559559
return b
560560
}

buffer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func TestTimestampSerialization(t *testing.T) {
117117
assert.NoError(t, err)
118118

119119
// Check the buffer
120-
expected := []byte("my_test_table a_col=" + strconv.FormatInt(tc.val.UnixMicro(), 10) + "t\n")
120+
expected := []byte("my_test_table a_col=" + strconv.FormatInt(tc.val.UnixNano(), 10) + "n\n")
121121
assert.Equal(t, expected, buf.Messages())
122122
})
123123
}

integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func setupQuestDB0(ctx context.Context, auth ilpAuthType, setupProxy bool) (*que
139139
}
140140
uniqueNetworkName := fmt.Sprintf("%s-%d", networkName, time.Now().UnixNano())
141141
req := testcontainers.ContainerRequest{
142-
Image: "questdb/questdb:9.0.2",
142+
Image: "questdb/questdb:9.0.3",
143143
ExposedPorts: []string{"9000/tcp", "9009/tcp"},
144144
WaitingFor: wait.ForHTTP("/settings").WithPort("9000"),
145145
Networks: []string{uniqueNetworkName},

0 commit comments

Comments
 (0)