From a0d7e30cfa39920ea79574215aa5152f5abd7562 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Mon, 19 Oct 2020 11:02:13 +0200 Subject: [PATCH] Fix #2261 (#2262) --- network/paloalto/snmp/mode/signatures.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/paloalto/snmp/mode/signatures.pm b/network/paloalto/snmp/mode/signatures.pm index 8d5b96a84..4590ed103 100644 --- a/network/paloalto/snmp/mode/signatures.pm +++ b/network/paloalto/snmp/mode/signatures.pm @@ -98,7 +98,7 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - 'timezone:s' => { name => 'timezone' } + 'timezone:s' => { name => 'timezone' } }); return $self; @@ -115,7 +115,7 @@ sub get_diff_time { my ($self, %options) = @_; # '29/10/2018 08:44:54' - return if ($options{time} !~ /^\s*(\d{4})\/(\d{2})\/(\d{2})\s+(\d+):(\d+):(\d+)/); + return undef if ($options{time} !~ /^\s*(\d{4})\/(\d{2})\/(\d{2})\s+(\d+):(\d+):(\d+)/); my $tz = centreon::plugins::misc::set_timezone(name => $self->{option_results}->{timezone}); my $dt = DateTime->new(