From 04c94a013ccba1690933156830efdc314de67ef8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 1 Jul 2016 17:55:52 -0700 Subject: [PATCH] Improve timestamp formatting lowercase the output, to prevent "About" halfway, and add "ago" to the output, as timestamps are always in the past. Signed-off-by: Sebastiaan van Stijn --- api/client/task/print.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/client/task/print.go b/api/client/task/print.go index 4909f159d5..bdb069ccf0 100644 --- a/api/client/task/print.go +++ b/api/client/task/print.go @@ -16,7 +16,7 @@ import ( ) const ( - psTaskItemFmt = "%s\t%s\t%s\t%s\t%s %s\t%s\t%s\n" + psTaskItemFmt = "%s\t%s\t%s\t%s\t%s %s ago\t%s\t%s\n" ) type tasksBySlot []swarm.Task @@ -69,7 +69,7 @@ func Print(dockerCli *client.DockerCli, ctx context.Context, tasks []swarm.Task, serviceValue, task.Spec.ContainerSpec.Image, client.PrettyPrint(task.Status.State), - units.HumanDuration(time.Since(task.Status.Timestamp)), + strings.ToLower(units.HumanDuration(time.Since(task.Status.Timestamp))), client.PrettyPrint(task.DesiredState), nodeValue, )