From c116477198a1cd78e2e43bfb38d413cb1f67a2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Mon, 1 Mar 2021 08:59:03 +0100 Subject: [PATCH] [Logs UI] Round up the end timestamp in the log stream embeddable (#92833) This fixes the interpretation of the end timestamp in the log stream embeddable such that it rounds it up. Without this a date range of `now/d` to `now/d` would be resolved to a zero-duration time range even though the date picker semantics are "Today". --- .../public/components/log_stream/log_stream_embeddable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx b/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx index e1427bc96e7e0..c69c7ebff2b9e 100644 --- a/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx +++ b/x-pack/plugins/infra/public/components/log_stream/log_stream_embeddable.tsx @@ -66,7 +66,7 @@ export class LogStreamEmbeddable extends Embeddable { } const startTimestamp = datemathToEpochMillis(this.input.timeRange.from); - const endTimestamp = datemathToEpochMillis(this.input.timeRange.to); + const endTimestamp = datemathToEpochMillis(this.input.timeRange.to, 'up'); if (!startTimestamp || !endTimestamp) { return;