PHP 8.1 #21121
This commit is contained in:
parent
be729ab5f3
commit
41ce28996c
@ -2761,7 +2761,7 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = 'auto',
|
|||||||
}
|
}
|
||||||
//var_dump($localtz);
|
//var_dump($localtz);
|
||||||
//var_dump($year.'-'.$month.'-'.$day.'-'.$hour.'-'.$minute);
|
//var_dump($year.'-'.$month.'-'.$day.'-'.$hour.'-'.$minute);
|
||||||
$dt = new DateTime(null, $localtz);
|
$dt = new DateTime('now', $localtz);
|
||||||
$dt->setDate((int) $year, (int) $month, (int) $day);
|
$dt->setDate((int) $year, (int) $month, (int) $day);
|
||||||
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
||||||
$date = $dt->getTimestamp(); // should include daylight saving time
|
$date = $dt->getTimestamp(); // should include daylight saving time
|
||||||
|
|||||||
@ -173,7 +173,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||||||
$this->lastTime = $now;
|
$this->lastTime = $now;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = strftime("%Y-%m-%d %H:%M:%S", time()).$delay." ".sprintf("%-7s", $logLevels[$content['level']])." ".sprintf("%-15s", $content['ip'])." ".($this->ident > 0 ?str_pad('', $this->ident, ' ') : '').$content['message'];
|
$message = dol_print_date(dol_now('gmt'), 'standard', 'gmt').$delay." ".sprintf("%-7s", $logLevels[$content['level']])." ".sprintf("%-15s", $content['ip'])." ".($this->ident > 0 ?str_pad('', $this->ident, ' ') : '').$content['message'];
|
||||||
fwrite($filefd, $message."\n");
|
fwrite($filefd, $message."\n");
|
||||||
fclose($filefd);
|
fclose($filefd);
|
||||||
@chmod($logfile, octdec(empty($conf->global->MAIN_UMASK) ? '0664' : $conf->global->MAIN_UMASK));
|
@chmod($logfile, octdec(empty($conf->global->MAIN_UMASK) ? '0664' : $conf->global->MAIN_UMASK));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user