From ddfa964025a892944cc3a20dbc70df527b91f9e0 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 26 May 2015 02:14:50 -0700 Subject: [PATCH] Fix erroneous build date formatting --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index bb55f8a76..446bfa847 100644 --- a/main.go +++ b/main.go @@ -259,11 +259,11 @@ var BuildDate string // getBuildDate - func getBuildDate() string { - if BuildDate == "" { + t, _ := time.Parse(time.RFC3339Nano, BuildDate) + if t.IsZero() { return "" } - t, _ := time.Parse(time.RFC3339Nano, BuildDate) - return t.String() + return t.Format(time.RFC1123) } // Tries to get os/arch/platform specific information