From 0dda97c889bb13011472931a345b839b22ee4295 Mon Sep 17 00:00:00 2001 From: Ibrahim Ridene Date: Tue, 10 Feb 2026 14:16:21 +0100 Subject: [PATCH] fix(logs): use UnixMilli instead of Unix for v1 logs search timestamps parseTimeString returns milliseconds but runLogsSearch passed them to time.Unix which expects seconds, producing timestamps far in the future and causing 400 Bad Request from the API. Co-Authored-By: Claude Opus 4.6 --- cmd/logs_simple.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/logs_simple.go b/cmd/logs_simple.go index df03dc24..de96ca94 100644 --- a/cmd/logs_simple.go +++ b/cmd/logs_simple.go @@ -655,8 +655,8 @@ func runLogsSearch(cmd *cobra.Command, args []string) error { api := datadogV1.NewLogsApi(client.V1()) limit := int32(logsLimit) - fromTimeObj := time.Unix(fromTime, 0) - toTimeObj := time.Unix(toTime, 0) + fromTimeObj := time.UnixMilli(fromTime) + toTimeObj := time.UnixMilli(toTime) body := datadogV1.LogsListRequest{ Query: &logsQuery,