Skip to content

Commit

Permalink
Correctly handle zero time in stream info state
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Aug 8, 2023
1 parent 218753f commit cc27fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/stream_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit cc27fac

Please sign in to comment.