Skip to content

Commit

Permalink
Merge pull request #839 from ripienaar/stream_state_first_time
Browse files Browse the repository at this point in the history
Correctly handle zero time in stream info state
  • Loading branch information
ripienaar authored Aug 8, 2023
2 parents 218753f + cc27fac commit 52155ef
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 52155ef

Please sign in to comment.