[Serializer] Fix workaround min php version
This commit is contained in:
parent
0478ecd472
commit
74db2e61bc
@ -81,7 +81,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface
|
||||
$timezone = $this->getTimezone($context);
|
||||
|
||||
if (null !== $dateTimeFormat) {
|
||||
if (null === $timezone && PHP_VERSION_ID < 50600) {
|
||||
if (null === $timezone && PHP_VERSION_ID < 70000) {
|
||||
// https://bugs.php.net/bug.php?id=68669
|
||||
$object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user