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 "<none>").
This commit is contained in:
Michael Schurter 2017-07-20 15:43:00 -07:00
parent a59bd61098
commit 6b2cb6bb23
1 changed files with 4 additions and 0 deletions

View File

@ -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")
}