mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix normalization of Date: use the same timezone as the original date
This commit is contained in:
parent
6ca4b91e1e
commit
128f8b8852
@ -74,12 +74,14 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
|
|||||||
$formatterLong = \IntlDateFormatter::create(
|
$formatterLong = \IntlDateFormatter::create(
|
||||||
$locale,
|
$locale,
|
||||||
\IntlDateFormatter::LONG,
|
\IntlDateFormatter::LONG,
|
||||||
$hasTime ? \IntlDateFormatter::SHORT : \IntlDateFormatter::NONE
|
$hasTime ? \IntlDateFormatter::SHORT : \IntlDateFormatter::NONE,
|
||||||
|
$date->getTimezone(),
|
||||||
);
|
);
|
||||||
$formatterShort = \IntlDateFormatter::create(
|
$formatterShort = \IntlDateFormatter::create(
|
||||||
$locale,
|
$locale,
|
||||||
\IntlDateFormatter::SHORT,
|
\IntlDateFormatter::SHORT,
|
||||||
$hasTime ? \IntlDateFormatter::SHORT : \IntlDateFormatter::NONE
|
$hasTime ? \IntlDateFormatter::SHORT : \IntlDateFormatter::NONE,
|
||||||
|
$date->getTimezone(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user