Fix elapsed time for application backup when it hasn't started
@@ -204,10 +204,14 @@ func applicationBackupPrinter(
} else if !applicationBackup.Status.FinishTimestamp.IsZero() {
elapsed = applicationBackup.Status.FinishTimestamp.Sub(applicationBackup.Status.TriggerTimestamp.Time).String()
}
+ } else {
+ if applicationBackup.Status.TriggerTimestamp.Time.IsZero() {
+ elapsed = "N/A"
} else {
elapsed = time.Since(applicationBackup.Status.TriggerTimestamp.Time).String()
}
}
+ }
creationTime := toTimeString(applicationBackup.Status.TriggerTimestamp.Time)
row := getRow(&applicationBackup,
