diff --git a/pkg/cli/token/token.go b/pkg/cli/token/token.go index 5be565df..6301933b 100644 --- a/pkg/cli/token/token.go +++ b/pkg/cli/token/token.go @@ -202,7 +202,7 @@ func list(app *cli.Context, cfg *cmds.Token) error { ttl := "" expires := "" if token.Expires != nil { - ttl = duration.ShortHumanDuration(token.Expires.Sub(time.Now())) + ttl = duration.ShortHumanDuration(time.Until(token.Expires.Time)) expires = token.Expires.Format(time.RFC3339) }