Bug #80963 [NEW]: DateTimeZone::getTransitions() truncated
| From: | thekid@php.net | Date: | Sat, 17 Apr 2021 15:16:40 +0000 |
| Subject: | Bug #80963 [NEW]: DateTimeZone::getTransitions() truncated | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-233473@lists.php.net to get a copy of this message | ||
From: thekid@php.net
Operating system: Windows
PHP version: master-Git-2021-04-17 (Git)
Package: Date/time related
Bug Type: Bug
Bug description:DateTimeZone::getTransitions() truncated
Description:
------------
DateTimeZone::getTransitions() changed between PHP 8.0.3 and current PHP
8.1.0-dev. Most probably related to
https://github.com/php/php-src/commit/091c0920b9db057a54dc43ece6e864bce6818d5e
Test script:
---------------
php -r '$tz= new DateTimeZone("Europe/London"); $t=
$tz->getTransitions(); var_dump(sizeof($t), end($t));'
Expected result:
----------------
int(243)
array(5) {
["ts"]=>
int(2140045200)
["time"]=>
string(24) "2037-10-25T01:00:00+0000"
["offset"]=>
int(0)
["isdst"]=>
bool(false)
["abbr"]=>
string(3) "GMT"
}
Actual result:
--------------
int(160)
array(5) {
["ts"]=>
int(828234000)
["time"]=>
string(24) "1996-03-31T01:00:00+0000"
["offset"]=>
int(3600)
["isdst"]=>
bool(true)
["abbr"]=>
string(3) "BST"
}
--
Edit bug report at https://bugs.php.net/bug.php?id=80963&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80963&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80963&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80963&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80963&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80963&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80963&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80963&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80963&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80963&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80963&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80963&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80963&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80963&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80963&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80963&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80963&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80963&r=mysqlcfg