mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-21 00:26:10 +02:00
Switch to DateTimeImmutable everywhere
This commit is contained in:
@@ -316,9 +316,9 @@ class Logger implements LoggerInterface
|
||||
}
|
||||
|
||||
if ($this->microsecondTimestamps) {
|
||||
$ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), $this->timezone);
|
||||
$ts = \DateTimeImmutable::createFromFormat('U.u', sprintf('%.6F', microtime(true)), $this->timezone);
|
||||
} else {
|
||||
$ts = new \DateTime('', $this->timezone);
|
||||
$ts = new \DateTimeImmutable('', $this->timezone);
|
||||
}
|
||||
$ts->setTimezone($this->timezone);
|
||||
|
||||
|
Reference in New Issue
Block a user