From e18c959fc25b8c6ec19481490639b8882f03f750 Mon Sep 17 00:00:00 2001 From: Lucie Tirand <123162035+lucie-tirand@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:45:57 +0200 Subject: [PATCH] fix(storage::emc::datadomain::snmp): fixed issue in cleaning mode when default value for timezone is empty leading to unknown (#5631) Refs: CTOR-1700 Co-authored-by: Lucie Dubrunfaut --- src/storage/emc/datadomain/snmp/mode/cleaning.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/emc/datadomain/snmp/mode/cleaning.pm b/src/storage/emc/datadomain/snmp/mode/cleaning.pm index 507e124bc..be6ea8d26 100644 --- a/src/storage/emc/datadomain/snmp/mode/cleaning.pm +++ b/src/storage/emc/datadomain/snmp/mode/cleaning.pm @@ -118,7 +118,7 @@ sub manage_selection { if ($snmp_result->{$oid} =~ /\s+(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)/) { my $dt = DateTime->new(year => $1, month => $2, day => $3, hour => $4, minute => $5, second => $6); # if the equipment check is on another timezone than the system where the plugin is executed. - if (defined($self->{option_results}->{timezone})){ + if (!centreon::plugins::misc::is_empty($self->{option_results}->{timezone})) { eval { $dt = $dt->set_time_zone($self->{option_results}->{timezone}); }; @@ -161,7 +161,7 @@ Select the time unit for thresholds. May be 's' for seconds, 'm' for minutes, 'h =item B<--timezone> -Set equipment timezone if different from Europe/London. Valid time zones can be found in C. +Set equipment timezone if different from UTC. Valid time zones can be found in C. Format example : Europe/Paris and America/Los_Angeles =item B<--warning-*> B<--critical-*>