Enhancement:

- Add more debug traces (if 'synchro_trace' == 'save')
- Show debug traces (if any) at the bottom of the status page
- Protect against time differences between the MySQL server and the PHP server, when running 'synchro_import.php'

SVN:trunk[4394]
This commit is contained in:
Denis Flaven
2016-09-12 12:47:40 +00:00
parent 445b488603
commit 90cab29a3c
2 changed files with 45 additions and 2 deletions

View File

@@ -341,7 +341,10 @@ try
$sSep = "\t";
}
$oLoadStartDate = new DateTime(); // Now
// In case there is a difference between the web server time and the DB server time,
// use the DB server time as a reference since this date/time will be compared with the "status_last_seen"
// column, which is populated by MySQL triggers (and so based on the DB server time)
$oLoadStartDate = new DateTime(CMDBSource::QueryToScalar('SELECT NOW()')); // Now... but as read from the database
// Note about date formatting: These MySQL settings are read-only... and in fact unused :-(
// SET SESSION date_format = '%d/%m/%Y';