From cc27face1ea94e52b67c0b5f73e6ba29e74286e4 Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Tue, 8 Aug 2023 23:21:18 +0300 Subject: [PATCH] Correctly handle zero time in stream info state Signed-off-by: R.I.Pienaar --- cli/stream_command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/stream_command.go b/cli/stream_command.go index 262003e6..11cc8114 100644 --- a/cli/stream_command.go +++ b/cli/stream_command.go @@ -1811,7 +1811,7 @@ func (c *streamCmd) showStreamInfo(info *api.StreamInfo) { cols.AddRowf("Lost Messages", "%s (%s)", f(len(info.State.Lost.Msgs)), humanize.IBytes(info.State.Lost.Bytes)) } - if info.State.FirstTime.Equal(time.Unix(0, 0)) || info.State.LastTime.IsZero() { + if info.State.FirstTime.Equal(time.Unix(0, 0)) || info.State.FirstTime.IsZero() { cols.AddRow("First Sequence", info.State.FirstSeq) } else { cols.AddRowf("First Sequence", "%s @ %s UTC", f(info.State.FirstSeq), f(info.State.FirstTime))