Merge pull request #575 from harshavardhana/pr_out_fix_the_bug_re_introduced_from_previous_fixes

This commit is contained in:
Harshavardhana
2015-04-29 01:43:40 -07:00
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ func runUpdateCmd(ctx *cli.Context) {
log.Debug.Println(iodine.New(err, nil))
console.Fatalln("Unable to parse update time:", results.LatestBuild)
}
current := getBuildDate()
current, _ := time.Parse(time.RFC3339Nano, BuildDate)
if current.IsZero() {
console.Fatalln("BuildDate is zero, must be a wrong build exiting..")
}
+6 -6
View File
@@ -57,12 +57,12 @@ func checkConfig() {
var BuildDate string
// getBuildDate -
func getBuildDate() time.Time {
if BuildDate == "" {
return time.Time{}
}
func getBuildDate() string {
t, _ := time.Parse(time.RFC3339Nano, BuildDate)
return t
if t.IsZero() {
return ""
}
return t.Format(time.RFC1123)
}
// Get os/arch/platform specific information.
@@ -99,7 +99,7 @@ func main() {
app.Usage = "Minio Client for object storage and filesystems"
app.Version = Version
app.Commands = commands
app.Compiled = getBuildDate().Format(time.RFC1123)
app.Compiled = getBuildDate()
app.Flags = flags
app.Author = "Minio.io"
app.Before = func(ctx *cli.Context) error {