Fixed date limit in historical_data
This commit is contained in:
parent
d6b91e9fce
commit
6c51c4e1e9
|
@ -3100,7 +3100,7 @@ function reporting_historical_data($report, $content)
|
||||||
|
|
||||||
$return['type'] = 'historical_data';
|
$return['type'] = 'historical_data';
|
||||||
$period = $content['period'];
|
$period = $content['period'];
|
||||||
$date_limit = (time() - $period);
|
$date_limit = ($report['datetime'] - $period);
|
||||||
if (empty($content['name'])) {
|
if (empty($content['name'])) {
|
||||||
$content['name'] = __('Historical data');
|
$content['name'] = __('Historical data');
|
||||||
}
|
}
|
||||||
|
@ -3169,7 +3169,7 @@ function reporting_historical_data($report, $content)
|
||||||
FROM tagente_datos_string
|
FROM tagente_datos_string
|
||||||
WHERE id_agente_modulo ='.$content['id_agent_module'].'
|
WHERE id_agente_modulo ='.$content['id_agent_module'].'
|
||||||
AND utimestamp >'.$date_limit.'
|
AND utimestamp >'.$date_limit.'
|
||||||
AND utimestamp <='.time(),
|
AND utimestamp <='.$report['datetime'],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -3180,7 +3180,7 @@ function reporting_historical_data($report, $content)
|
||||||
FROM tagente_datos
|
FROM tagente_datos
|
||||||
WHERE id_agente_modulo ='.$content['id_agent_module'].'
|
WHERE id_agente_modulo ='.$content['id_agent_module'].'
|
||||||
AND utimestamp >'.$date_limit.'
|
AND utimestamp >'.$date_limit.'
|
||||||
AND utimestamp <='.time(),
|
AND utimestamp <='.$report['datetime'],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue