|
|
@@ -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;
|
|
|
}
|
|
|
|