diff --git a/cli/helpers.go b/cli/helpers.go index 21f57ec..76e91b5 100644 --- a/cli/helpers.go +++ b/cli/helpers.go @@ -14,7 +14,8 @@ func timeStringWithAgo(t time.Time) string { out := t.Local().Format("2006-01-02 15:04") if ago := time.Now().Sub(t); ago < 24*time.Hour { - if str := roundDurationRE.FindString(ago.String()); str != "" { + agoStr := ago.Round(time.Second).String() + if str := roundDurationRE.FindString(agoStr); str != "" { out = fmt.Sprintf("%s (~ %s ago)", out, str) } }