From 85f0511db3a5c2ec13495100f6f7d6a6f48d7c65 Mon Sep 17 00:00:00 2001 From: Alwin Antreich Date: Thu, 4 Jul 2019 11:00:58 +0200 Subject: [PATCH] Fix: rtcflags: ignore startdate 'now' If 'now' is passed to the startdate option, the kvm start fails with below failure. kvm: invalid datetime format valid formats: '2006-06-17T16:01:21' or '2006-06-17' With this patch, 'now' is ignored and not passed to the rtcflags (-rtc). Signed-off-by: Alwin Antreich --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index b4b15801..5ef92a3f 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3854,7 +3854,7 @@ sub config_to_command { push @$machineFlags, "type=${machine_type}"; } - if ($conf->{startdate}) { + if (($conf->{startdate}) && ($conf->{startdate} ne 'now')) { push @$rtcFlags, "base=$conf->{startdate}"; } elsif ($useLocaltime) { push @$rtcFlags, 'base=localtime';