From 6c51c4e1e9c29612160af18c79bd0ac047750478 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 2 Sep 2019 11:18:04 +0200 Subject: [PATCH] Fixed date limit in historical_data --- pandora_console/include/functions_reporting.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f2ea630617..4abf5152c1 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3100,7 +3100,7 @@ function reporting_historical_data($report, $content) $return['type'] = 'historical_data'; $period = $content['period']; - $date_limit = (time() - $period); + $date_limit = ($report['datetime'] - $period); if (empty($content['name'])) { $content['name'] = __('Historical data'); } @@ -3169,7 +3169,7 @@ function reporting_historical_data($report, $content) FROM tagente_datos_string WHERE id_agente_modulo ='.$content['id_agent_module'].' AND utimestamp >'.$date_limit.' - AND utimestamp <='.time(), + AND utimestamp <='.$report['datetime'], true ); break; @@ -3180,7 +3180,7 @@ function reporting_historical_data($report, $content) FROM tagente_datos WHERE id_agente_modulo ='.$content['id_agent_module'].' AND utimestamp >'.$date_limit.' - AND utimestamp <='.time(), + AND utimestamp <='.$report['datetime'], true ); break;