correctly create log file name. fixes #3699

strtoftime does not always recognize Unix Timestamps
This commit is contained in:
Andreas Gohr 2022-06-29 19:03:32 +02:00
parent 40bf970f9b
commit baa301e284
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,9 @@ class Logger
{
global $conf;
if ($date !== null) $date = strtotime($date);
if($date !== null && !is_numeric($date)) {
$date = strtotime($date);
}
if (!$date) $date = time();
return $conf['logdir'] . '/' . $this->facility . '/' . date('Y-m-d', $date) . '.log';