Repository navigation
fix: Update deprecated timezone names - #756
Conversation
ef1d848 to
675c657
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #756 +/- ##
============================================
- Coverage 98.77% 98.69% -0.08%
- Complexity 1889 1891 +2
============================================
Files 71 71
Lines 5296 5300 +4
============================================
Hits 5231 5231
- Misses 65 69 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| 'N. Central Asia Standard Time' => 'Asia/Novosibirsk', | ||
| 'Namibia Standard Time' => 'Africa/Windhoek', | ||
| 'Nepal Standard Time' => 'Asia/Katmandu', | ||
| 'Nepal Standard Time' => 'Asia/Kathmandu', |
There was a problem hiding this comment.
Yes! This has been annoying having Kathmandu spelled wrong.
phil-davis
left a comment
There was a problem hiding this comment.
This LGTM.
@staabm what do you think?
Can you see any issue about the old names etc?
| { | ||
| // Next, we check if the tzid is somewhere in our tzid map. | ||
| if ($this->hasTzInMap($tzid)) { | ||
| return new \DateTimeZone($this->getTzFromMap($tzid)); |
There was a problem hiding this comment.
before this PR the observed behaviour of find was that it would throw (even if it was not a documented behaviour).
I find the new behaviour more useful, but I think we need to at least document this "breaking change" - we can use a @throws void phpdoc (for static analysis support), but can also document it in the changelog
There was a problem hiding this comment.
done, and will mention this in the changelog/release notes. This can be part of a minor version bump.
Systems without the tzdata-legacy package, i.e. (Ubuntu 24.04+) reject deprecated names. Examples: Europe/Kiev, Asia/Calcutta, America/Godthab This causes FindFromTimezoneMap::find() to throw. Update all 13 occurrences across windowszones, lotuszones and exchangezones maps to their canonical replacements and wrap DateTimeZone instantiation in try/catch for resilience against future renames. Comes with unit test
3d5f750 to
091d6d8
Compare
Supersedes #755 which was based against the current maintenance branch and thus had a huge, misleading diff.
fix(timezonedata): Replace deprecated IANA timezone names
Systems without the tzdata-legacy package, i.e. (Ubuntu 24.04+) reject deprecated names.
Examples: Europe/Kiev, Asia/Calcutta, America/Godthab
This causes FindFromTimezoneMap::find() to throw.
Update all 13 occurrences across windowszones, lotuszones and exchangezones maps to their canonical replacements and wrap DateTimeZone instantiation in try/catch for resilience against future renames.
Comes with unit test