[php-src] PR #24126: ext/intl: Use byte offsets in IntlDateFormatter parsing
| From: | iliaal | Date: | Sun, 04 Oct 2026 22:19:40 +0000 |
| Subject: | [php-src] PR #24126: ext/intl: Use byte offsets in IntlDateFormatter parsing | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39143@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24126
Author: iliaal
IntlDateFormatter::parse(), localtime() and parseToCalendar() handed the PHP byte offset straight to
ICU, which counts UTF-16 code units, so any multibyte text before the date made parsing start in the
wrong place and the returned offset come back short (an emoji prefix parsed "2017-10-12"
as year 17). This converts the offset both ways the same way GH-23094 did for NumberFormatter.