Browse Source

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.
Marek Marczykowski 11 years ago
parent
commit
d48ed3ca57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubesmanager/main.py

+ 1 - 1
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",