mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Only use DateTimeImmutable formatting for default date format, fixes #827
This commit is contained in:
@@ -300,7 +300,9 @@ class NormalizerFormatter implements FormatterInterface
|
||||
|
||||
protected function formatDate(\DateTimeInterface $date)
|
||||
{
|
||||
if ($date instanceof DateTimeImmutable) {
|
||||
// in case the date format isn't custom then we defer to the custom DateTimeImmutable
|
||||
// formatting logic, which will pick the right format based on whether useMicroseconds is on
|
||||
if ($this->dateFormat === self::SIMPLE_DATE && $date instanceof DateTimeImmutable) {
|
||||
return (string) $date;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user