From 910eced1ef94f1fbd1135bd99318e5800418bfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duret?= Date: Fri, 19 Oct 2018 09:51:04 +0200 Subject: [PATCH] fix bug with comma on french Windows OS (#1175) --- .../apps/hyperv/2012/local/mode/nodesnapshot.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/apps/hyperv/2012/local/mode/nodesnapshot.pm b/centreon-plugins/apps/hyperv/2012/local/mode/nodesnapshot.pm index b4c5aef4d..b2e6366c8 100644 --- a/centreon-plugins/apps/hyperv/2012/local/mode/nodesnapshot.pm +++ b/centreon-plugins/apps/hyperv/2012/local/mode/nodesnapshot.pm @@ -118,7 +118,9 @@ sub manage_selection { my ($name, $status, $note, $content) = ($1, $2, $3, $4); my %chkpt = (backing => -1, snapshot => -1); while ($content =~ /\[checkpointCreationTime=\s*(.*?)\s*\]\[type=\s*(.*?)\s*\]/msig) { - $chkpt{$2} = $1 if ($chkpt{$2} == -1 || $chkpt{$2} > $1); + my ($timestamp, $type) = ($1, $2); + $timestamp =~ s/,/\./g; + $chkpt{$type} = $timestamp if ($chkpt{$type} == -1 || $chkpt{$type} > $timestamp); } next if ($chkpt{backing} == -1 && $chkpt{snapshot} == -1); @@ -204,4 +206,4 @@ Can be: 'snapshot' (in seconds), 'backing' (in seconds). =back -=cut \ No newline at end of file +=cut