Merge branch 'ent-5763-cambio-comportamiento-por-defecto-de-use_xml_timestamp' into 'develop'

Update default value for use_xml_timestamp

See merge request artica/pandorafms!3243
This commit is contained in:
Alejandro Fraguas 2020-06-12 13:26:31 +02:00
commit 116f102d0a
2 changed files with 3 additions and 1 deletions

View File

@ -399,7 +399,8 @@ sub pandora_load_config {
$pa_config->{'max_log_generation'} = 1;
# Ignore the timestamp in the XML and use the file timestamp instead
$pa_config->{'use_xml_timestamp'} = 0;
# If 1 => uses timestamp from received XML #5763.
$pa_config->{'use_xml_timestamp'} = 1;
# Server restart delay in seconds
$pa_config->{'restart_delay'} = 60;

View File

@ -234,6 +234,7 @@ sub data_consumer ($$) {
}
# Ignore the timestamp in the XML and use the file timestamp instead
# If 1 => uses timestamp from received XML #5763.
$xml_data->{'timestamp'} = strftime ("%Y-%m-%d %H:%M:%S", localtime((stat($file_name))[9])) if ($pa_config->{'use_xml_timestamp'} eq '0' || ! defined ($xml_data->{'timestamp'}));
# Double check that the file exists