From 5eb5a184f50d2ed5d6899f70397d86564b1a7315 Mon Sep 17 00:00:00 2001 From: Simon Bomm Date: Thu, 18 Jun 2020 10:23:58 +0200 Subject: [PATCH] fix(bug)subtract-didnt-get-job-done --- centreon-plugins/apps/pvx/restapi/custom/api.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centreon-plugins/apps/pvx/restapi/custom/api.pm b/centreon-plugins/apps/pvx/restapi/custom/api.pm index 72d23b9c0..947801d74 100644 --- a/centreon-plugins/apps/pvx/restapi/custom/api.pm +++ b/centreon-plugins/apps/pvx/restapi/custom/api.pm @@ -169,7 +169,7 @@ sub query_range { my $tz = centreon::plugins::misc::set_timezone(name => $self->{timezone}); my $dt = DateTime->now(%$tz); - my $start_time = $dt->subtract(seconds => $options{timeframe})->epoch(); + my $start_time = $dt->epoch() - $options{timeframe}; my $end_time = $dt->epoch(); my $uri = URI::Encode->new({encode_reserved => 1});