From fb0a37c644d737bcc9e6afb9acd0617a56fd2de2 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 12 May 2017 16:53:07 +0200 Subject: [PATCH] + fix time to utc --- centreon/common/powershell/hyperv/2012/nodesnapshot.pm | 4 ++-- centreon/common/powershell/hyperv/2012/scvmmsnapshot.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/centreon/common/powershell/hyperv/2012/nodesnapshot.pm b/centreon/common/powershell/hyperv/2012/nodesnapshot.pm index 28b715eb5..0134855fe 100644 --- a/centreon/common/powershell/hyperv/2012/nodesnapshot.pm +++ b/centreon/common/powershell/hyperv/2012/nodesnapshot.pm @@ -51,7 +51,7 @@ Try { if ($i -eq 0) { Write-Host "[name=" $vm.VMName "][state=" $vm.State "][note=" $note "]" } - Write-Host "[checkpointCreationTime=" (get-date -date $snap.CreationTime -UFormat ' . "'%s'" . ') "]" + Write-Host "[checkpointCreationTime=" (get-date -date $snap.CreationTime.ToUniversalTime() -UFormat ' . "'%s'" . ') "]" $i=1 } } @@ -64,7 +64,7 @@ Try { if ($i -eq 0) { Write-Host "[name=" $vm.VMName "][state=" $vm.State "][note=" $note "]" } - Write-Host "[checkpointCreationTime=" (get-date -date $parent.LastWriteTime -UFormat ' . "'%s'" . ') "]" + Write-Host "[checkpointCreationTime=" (get-date -date $parent.LastWriteTime.ToUniversalTime() -UFormat ' . "'%s'" . ') "]" $i=1 } } diff --git a/centreon/common/powershell/hyperv/2012/scvmmsnapshot.pm b/centreon/common/powershell/hyperv/2012/scvmmsnapshot.pm index 9e7918f15..07fe8305b 100644 --- a/centreon/common/powershell/hyperv/2012/scvmmsnapshot.pm +++ b/centreon/common/powershell/hyperv/2012/scvmmsnapshot.pm @@ -55,7 +55,7 @@ Try { if ($i -eq 0) { Write-Host "[name=" $vm.Name "][description=" $desc "][status=" $vm.Status "][cloud=" $vm.Cloud "][hostgrouppath=" $vm.HostGroupPath "]" } - Write-Host "[checkpointAddedTime=" (get-date -date $checkpoint.AddedTime -UFormat ' . "'%s'" . ') "]" + Write-Host "[checkpointAddedTime=" (get-date -date $checkpoint.AddedTime.ToUniversalTime() -UFormat ' . "'%s'" . ') "]" $i = 1 } }