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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2016-07-01 17:55:52 -07:00
parent 212988d68d
commit 04c94a013c
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 2 deletions

View File

@ -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,
)