From d48ed3ca570ba615370a166d451cb1540f5d99b2 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 23 Feb 2013 16:18:43 +0100 Subject: [PATCH] Use local time in shutdown monitor vm.get_start_time() is in local time, so compare it also with local time, not the UTC one. --- qubesmanager/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 2490b55..0b7468b 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -656,7 +656,7 @@ class VmShutdownMonitor(QObject): def check_if_vm_has_shutdown(self): vm = self.vm vm_start_time = vm.get_start_time() - if not vm.is_running() or (vm_start_time and vm_start_time >= datetime.utcnow() - timedelta(0,self.shutdown_time/1000)): + if not vm.is_running() or (vm_start_time and vm_start_time >= datetime.now() - timedelta(0,self.shutdown_time/1000)): return reply = QMessageBox.question(None, "VM Shutdown",