Fix log must use GMT date

This commit is contained in:
Laurent Destailleur
2024-05-17 03:53:51 +02:00
parent 05ed5dbe6a
commit 5172f65c2e

View File

@@ -92,7 +92,7 @@ $hookmanager->initHooks(array('cli'));
$now = dol_now();
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." - userlogin=".$userlogin." - ".dol_print_date($now, 'dayhourrfc')." - ".gethostname()." *****\n";
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." - userlogin=".$userlogin." - ".dol_print_date($now, 'dayhourrfc', 'gmt')." - ".gethostname()." *****\n";
// Check module cron is activated
if (!isModEnabled('cron')) {
@@ -293,11 +293,14 @@ if (is_array($object->lines) && (count($object->lines) > 0)) {
$db->close();
print "***** ".$script_file." end - ".dol_print_date($now, 'dayhourrfc', 'gmt')." - ".gethostname()." *****\n";
if ($nbofjobslaunchedko) {
exit(1);
}
exit(0);
/**
* script cron usage
*