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.
This commit is contained in:
Marek Marczykowski 2013-02-23 16:18:43 +01:00
parent 4d9e30784e
commit d48ed3ca57

View File

@ -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",