[php-src] Issue #9165: Since PHP 8.1.7 strtotime translates a date-time with DST/non-DST hour differently based on default timezone

From: Date: Wed, 27 Jul 2022 07:50:59 +0000
Subject: [php-src] Issue #9165: Since PHP 8.1.7 strtotime translates a date-time with DST/non-DST hour differently based on default timezone
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242036@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9165 Author: ashiful-kyos ### Description For the timezone Europe/London on date 2018-10-28 two hour 01:00:00 exist - one DST and another non-DST. Following code shows that it gives two different timestamp based on the set default timezone. Which should not be the case as the string date-time provided to strtotime already contains the timezone. Prior to PHP 8.1.7 strtotime was translating it into 1540688400 regardless set timezone. ```php date_default_timezone_set('America/Lower_Princes'); echo strtotime("2018-10-28 01:00:00 Europe/London") . PHP_EOL; date_default_timezone_set('Europe/London'); echo strtotime("2018-10-28 01:00:00 Europe/London"). PHP_EOL; <?php ``` Resulted in this output: ``` 1540688400 1540684800 ``` But I expected this output instead: ``` 1540688400 1540688400 ``` ### PHP Version PHP 8.1.7 ### Operating System _No response_

« previous php.bugs (#242036) next »