-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Intl] Unrecognized timezones throwing errors #54687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like this is related to the fact that timezones can have aliases which we handle in |
Hey, thanks for your report! |
still relevant |
Up to have a look for a fix @Seb33300 or anyone else? |
Hey, thanks for your report! |
Hello? This issue is about to be closed if nobody replies. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Uh oh!
There was an error while loading. Please reload this page.
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: