mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
should use time.Since instead of time.Now().Sub
This commit is contained in:
committed by
Guoliang Wang
parent
a5c3c8d16c
commit
89669283fe
@@ -503,7 +503,8 @@ func translateTimestamp(timestamp metav1.Time) string {
|
||||
if timestamp.IsZero() {
|
||||
return "<unknown>"
|
||||
}
|
||||
return duration.ShortHumanDuration(time.Now().Sub(timestamp.Time))
|
||||
|
||||
return duration.ShortHumanDuration(time.Since(timestamp.Time))
|
||||
}
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user