Commit 9691519
committed
bug symfony#31865 [Form] Fix wrong DateTime on outdated ICU library (aweelex)
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix wrong DateTime on outdated ICU library
| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |
There is a problem, when server uses outdated version of ICU (php-intl).
It throws no exeption or debug message on unexisting Timezone. So sometimes you can get wrong DateTime in Forms, because Intl uses 'Etc/Unknown' (UTC+0) instead correct Timezone. And it happens very unobvious.
I added `\IntlExeption` for that cases.
Commits
-------
a6025ab Change IntlTimeZone to DateTimeZoneFile tree
1 file changed
+2
-5
lines changed- src/Symfony/Component/Form/Extension/Core/DataTransformer
1 file changed
+2
-5
lines changedsrc/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 165 | + | |
| 166 | + | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
| |||
0 commit comments