[php-src] Issue #7752: DateTimeZone::getTransitions() returns insufficient data

From: Date: Fri, 01 Apr 2022 11:08:04 +0000
Subject: [php-src] Issue #7752: DateTimeZone::getTransitions() returns insufficient data
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240621@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7752 Comment Author: derickr Hi, there are bunch of things going on here. - First of all, the PHP 8.1.x result is correct in @mvorisek example. - Before PHP 8.1, transitions were only tracked until 2100. Anything after that, used the last rule. For Los_Angeles, that would have been UTC-8 (incorrectly). - In PHP 8.1 and later, timelib has implemented support for POSIX TZ strings, which allow to calculate transitions with the existing rules. - Operating Systems changed their tzdata format from "fat" to "small", and the latter only includes transitions up until the last **change** in DST rules. For anything beyond that, POSIX TZ strings must now be used. (This explains the discrepancies between different distributions of the same PHP version) - This means that it can now knows about DST in 2203, where UTC-7 applies: string(25) "2203-10-05T15:05:37-07:00" - @iluuu1994's comment (https://github.com/php/php-src/issues/7752#issuecomment-991181138) is indeed a **bug**, in where transitions were not returned if an initial timestamp was passed to getTransions, which lay **after** the last transition (from the slim files). It is likely the same issue as in #8108.

« previous php.bugs (#240621) next »