switch ($config->get('system', 'logger_config', 'stream')) {
case 'monolog':
+ $loggerTimeZone = new \DateTimeZone('UTC');
+ Monolog\Logger::setTimezone($loggerTimeZone);
+
$logger = new Monolog\Logger($channel);
$logger->pushProcessor(new Monolog\Processor\PsrLogMessageProcessor());
$logger->pushProcessor(new Monolog\Processor\ProcessIdProcessor());
$record = array_merge($record, ['uid' => $this->logUid, 'process_id' => $this->pid]);
$logMessage = '';
- $logMessage .= DateTimeFormat::localNow() . ' ';
+ $logMessage .= DateTimeFormat::utcNow() . ' ';
$logMessage .= $this->channel . ' ';
$logMessage .= '[' . strtoupper($level) . ']: ';
$logMessage .= $this->psrInterpolate($message, $context) . ' ';