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:
parent
4d9e30784e
commit
d48ed3ca57
@ -656,7 +656,7 @@ class VmShutdownMonitor(QObject):
|
|||||||
def check_if_vm_has_shutdown(self):
|
def check_if_vm_has_shutdown(self):
|
||||||
vm = self.vm
|
vm = self.vm
|
||||||
vm_start_time = vm.get_start_time()
|
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
|
return
|
||||||
|
|
||||||
reply = QMessageBox.question(None, "VM Shutdown",
|
reply = QMessageBox.question(None, "VM Shutdown",
|
||||||
|
Loading…
Reference in New Issue
Block a user