gh9165.phpt 630 B

123456789101112131415161718192021
  1. --TEST--
  2. GH-9165 (strtotime translates a date-time with DST/non-DST hour differently based on default timezone)
  3. --FILE--
  4. <?php
  5. date_default_timezone_set('America/Lower_Princes');
  6. echo strtotime("2018-10-28 01:00:00 Europe/London") . PHP_EOL;
  7. date_default_timezone_set('Europe/London');
  8. echo strtotime("2018-10-28 01:00:00 Europe/London"). PHP_EOL;
  9. date_default_timezone_set('America/Lower_Princes');
  10. echo strtotime("2018-10-28 04:00:00 Europe/London") . PHP_EOL;
  11. date_default_timezone_set('Europe/London');
  12. echo strtotime("2018-10-28 04:00:00 Europe/London"). PHP_EOL;
  13. ?>
  14. --EXPECT--
  15. 1540684800
  16. 1540684800
  17. 1540699200
  18. 1540699200