From 2d08fd029dd1a5e362acd51165c677a577034d73 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 6 Jun 2024 13:55:11 +0200 Subject: [PATCH] [hotfix] datetime formatting caused error when time not set --- PyLoT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyLoT.py b/PyLoT.py index b7ca4172..58275c4f 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -1459,7 +1459,7 @@ class MainWindow(QMainWindow): if event.dirty: event_str += '*' item_path = QStandardItem(event_str) - item_time = QStandardItem('{}'.format(time.strftime("%Y-%m-%d %H:%M:%S"))) + item_time = QStandardItem('{}'.format(time.strftime("%Y-%m-%d %H:%M:%S") if time else '')) item_lat = QStandardItem('{}'.format(lat)) item_lon = QStandardItem('{}'.format(lon)) item_depth = QStandardItem('{}'.format(depth))