fix: if no container created time, use 0 instead of system time

This commit is contained in:
Jack Wills
2022-12-05 03:22:08 +00:00
parent a05b0b08c3
commit 1adb61ce3b
+1 -2
View File
@@ -439,7 +439,6 @@ impl AppData {
if !all_containers.is_empty() && self.containers.state.selected().is_none() { if !all_containers.is_empty() && self.containers.state.selected().is_none() {
self.containers.start(); self.containers.start();
} }
let now = Self::get_systemtime();
for (index, id) in all_ids.iter().enumerate() { for (index, id) in all_ids.iter().enumerate() {
if !all_containers if !all_containers
@@ -482,7 +481,7 @@ impl AppData {
let id = ContainerId::from(id); let id = ContainerId::from(id);
let created = i.created.map_or(now, |i| u64::try_from(i).unwrap_or(now)); let created = i.created.map_or(0, |i| u64::try_from(i).unwrap_or(0));
// If container info already in containers Vec, then just update details // If container info already in containers Vec, then just update details
if let Some(item) = self.get_container_by_id(&id) { if let Some(item) = self.get_container_by_id(&id) {
if item.name != name { if item.name != name {