1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

Improve build

This commit is contained in:
Jordi Boggiano
2020-12-09 14:22:04 +01:00
parent bd9570d835
commit c5853b9b0f
27 changed files with 127 additions and 72 deletions

View File

@@ -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]);