From 6b2cb6bb2340794f8dd76676dec92a6a8068aefa Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 20 Jul 2017 15:43:00 -0700 Subject: [PATCH] Don't display UNIX epoch dates Submitted times are UNIX epoch for jobs created before 0.6 which is confusing in the CLI. Display nothing instead (formatted as ""). --- command/helpers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/helpers.go b/command/helpers.go index 447920ce7..32ba914dd 100644 --- a/command/helpers.go +++ b/command/helpers.go @@ -53,6 +53,10 @@ func limit(s string, length int) string { // formatTime formats the time to string based on RFC822 func formatTime(t time.Time) string { + if t.Unix() < 1 { + // It's more confusing to display the UNIX epoch or a zero value than nothing + return "" + } return t.Format("01/02/06 15:04:05 MST") }