From 6b1a5101c322c53e112cd993904b2107c9adfbc0 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 10 Feb 2019 15:17:58 -0500 Subject: [PATCH] Make CRD column printers consistent with typed printers Almost all other server side printers use duration.HumanDuration which has higher precision output. Switch CRD printers to use this as well. --- staging/src/k8s.io/apimachinery/pkg/api/meta/table/table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/table/table.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/table/table.go index 2144a77cb1..798cc41bdd 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/table/table.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/table/table.go @@ -67,5 +67,5 @@ func ConvertToHumanReadableDateType(timestamp metav1.Time) string { if timestamp.IsZero() { return "" } - return duration.ShortHumanDuration(time.Now().Sub(timestamp.Time)) + return duration.HumanDuration(time.Now().Sub(timestamp.Time)) }