mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Improve build
This commit is contained in:
@@ -94,7 +94,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
|
||||
$hostname = '-';
|
||||
}
|
||||
|
||||
if ($this->rfc === self::RFC3164) {
|
||||
if ($this->rfc === self::RFC3164 && ($datetime instanceof \DateTimeImmutable || $datetime instanceof \DateTime)) {
|
||||
$datetime->setTimezone(new \DateTimeZone('UTC'));
|
||||
}
|
||||
$date = $datetime->format($this->dateFormats[$this->rfc]);
|
||||
|
Reference in New Issue
Block a user