This commit is contained in:
garnier-quentin 2020-02-20 09:48:24 +01:00
parent 5cbdc156f1
commit befbae4c8c

View File

@ -169,8 +169,8 @@ sub query_range {
my $tz = centreon::plugins::misc::set_timezone(name => $self->{timezone}); my $tz = centreon::plugins::misc::set_timezone(name => $self->{timezone});
my $dt = DateTime->now(%$tz); my $dt = DateTime->now(%$tz);
my $start_time = $dt->subtract(seconds => $options{timeframe})->epoch; my $start_time = $dt->subtract(seconds => $options{timeframe})->epoch();
my $end_time = $dt->now->epoch; my $end_time = $dt->epoch();
my $uri = URI::Encode->new({encode_reserved => 1}); my $uri = URI::Encode->new({encode_reserved => 1});
my $query = sprintf('%s SINCE %s UNTIL %s', $options{query}, $start_time, $end_time); my $query = sprintf('%s SINCE %s UNTIL %s', $options{query}, $start_time, $end_time);