mirror of
https://github.com/php/php-src.git
synced 2024-10-20 16:02:44 +00:00
25168fffd5
#- Bug might actually be in date() rendering things wrong, but that code # is not yet replaced.
24 lines
695 B
PHP
24 lines
695 B
PHP
--TEST--
|
|
Bug #30532 (strtotime - crossing daylight savings time)
|
|
--FILE--
|
|
<?php
|
|
putenv("TZ=America/New_York");
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +1 hour'))."\n";
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +2 hours'))."\n";
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +3 hours'))."\n";
|
|
|
|
echo "\n";
|
|
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +1 hour'))."\n";
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +2 hours'))."\n";
|
|
echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +3 hours'))."\n";
|
|
?>
|
|
--EXPECT--
|
|
2004-10-31 01:00:00 EDT
|
|
2004-10-31 01:00:00 EST
|
|
2004-10-31 02:00:00 EST
|
|
|
|
2004-10-31 01:00:00 EDT
|
|
2004-10-31 02:00:00 EST
|
|
2004-10-31 03:00:00 EST
|