From 8e35845546569e021a6b70722ab88e4695a809e1 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Mon, 25 Aug 2014 17:08:11 +0200 Subject: [PATCH] + Fix option timezone 'time' mode in snmp --- snmp_standard/mode/ntp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snmp_standard/mode/ntp.pm b/snmp_standard/mode/ntp.pm index 41acb16ea..5d02a21e6 100644 --- a/snmp_standard/mode/ntp.pm +++ b/snmp_standard/mode/ntp.pm @@ -111,7 +111,7 @@ sub run { my @remote_date = unpack 'n C6 a C2', $result->{$oid_hrSystemDate}; my $timezone = 'UTC'; - if (defined($self->{option_results}->{timezone})) { + if (defined($self->{option_results}->{timezone}) && $self->{option_results}->{timezone} ne '') { $timezone = $self->{option_results}->{timezone}; } elsif (defined($remote_date[9])) { $timezone = sprintf("%s%02d%02d", $remote_date[7], $remote_date[8], $remote_date[9]); # format +0630