More robust MP time parsing
@@ -459,12 +459,16 @@ class BaseFileBrowser(ttk.Frame):
path = self.tree.set(node_id, "path")
if data.get("time"):
+ try:
dtime = datetime.datetime.fromtimestamp(int(data["time"]))
- # time_str = dtime.strftime("%c")
+ except Exception:
+ time_str = ""
+ else:
time_str = dtime.isoformat().replace("T", " ")
- self.tree.set(node_id, "time", time_str)
else:
- self.tree.set(node_id, "time", "")
+ time_str = ""
+
+ self.tree.set(node_id, "time", time_str)
if data["isdir"]:
self.tree.set(node_id, "kind", "dir")
