You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the first timezone, it looks to be a conflict in the timezone name, Intl is expecting Europe/Kiev:
useSymfony\Component\Intl\Timezones;
Timezones::exists('Europe/Kiev'); // returns trueTimezones::getName('Europe/Kiev'); // returns "Eastern European Time (Kyiv)"Timezones::exists('Europe/Kyiv'); // returns trueTimezones::getName('Europe/Kyiv'); // throws exceptionTimezones::getIds(); // contains "Europe/Kiev" only
Exception:
Couldn't read the indices [Names][Europe/Kyiv] for the locale "en" in "vendor\symfony\intl/Resources/data/timezones". The indices also couldn't be found for the fallback locale(s) "root".
For the second second issue with America/Ciudad_Juarez, I have no idea why it fails:
An exception has been thrown during the rendering of a template ("datefmt_create: time zone id 'America/Ciudad_Juarez' extracted from ext/date DateTimeZone not recognized: U_ILLEGAL_ARGUMENT_ERROR").
Possible Solution
I am not sure how to solve this?
Intl component may automatically translate Europe/Kyiv into Europe/Kiev?
If not, Timezones::exists('Europe/Kyiv'); should return false and not true.
Additional Context
Maybe more issues with other timezones?
I did not try all of them.
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
7.0.6
Description
I am facing an exception when trying to render localized dates with twig for some timezones.
Looks like for some timezones, the Intl component uses different names than the PHP timezone list:
https://www.php.net/manual/en/timezones.europe.php
For example, in the PHP list, we have
Europe/Kyiv
but Intl needsEurope/Kiev
.Maybe related to the locale used?
And another issue with
America/Ciudad_Juarez
.How to reproduce
I am setting the timezone to twig like this:
For the first timezone, it looks to be a conflict in the timezone name, Intl is expecting
Europe/Kiev
:Exception:
For the second second issue with
America/Ciudad_Juarez
, I have no idea why it fails:Exception:
Possible Solution
I am not sure how to solve this?
Intl component may automatically translate
Europe/Kyiv
intoEurope/Kiev
?If not,
Timezones::exists('Europe/Kyiv');
should returnfalse
and nottrue
.Additional Context
Maybe more issues with other timezones?
I did not try all of them.
The text was updated successfully, but these errors were encountered: