mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-02 19:27:37 +02:00
Fix deprecation warning on PHP 8.1
This commit is contained in:
@@ -321,7 +321,7 @@ class Logger implements LoggerInterface, ResettableInterface
|
|||||||
if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
|
if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
|
||||||
$ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
|
$ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
|
||||||
} else {
|
} else {
|
||||||
$ts = new \DateTime(null, static::$timezone);
|
$ts = new \DateTime('now', static::$timezone);
|
||||||
}
|
}
|
||||||
$ts->setTimezone(static::$timezone);
|
$ts->setTimezone(static::$timezone);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user