php-src/ext/date/tests/bug20382-1.phpt

18 lines
573 B
Plaintext
Raw Normal View History

2004-04-08 16:17:35 +00:00
--TEST--
Bug #20382 [1] (strtotime ("Monday", $date) produces wrong result on DST changeover)
2009-05-12 19:46:58 +00:00
--INI--
date.timezone=Europe/Amsterdam
2004-04-08 16:17:35 +00:00
--FILE--
<?php
2020-02-03 21:52:20 +00:00
$tStamp = mktime (17, 17, 17, 10, 27, 2004);
echo "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n";
2018-09-16 17:16:42 +00:00
2020-02-03 21:52:20 +00:00
$strtotime_timestamp = strtotime ("Monday", $tStamp);
echo "result=". date("l Y-m-d H:i:s T", $strtotime_timestamp). "\n";
echo "wanted=Monday 2004-11-01 00:00:00 CET\n";
2004-04-08 16:17:35 +00:00
?>
--EXPECT--
tStamp=Wednesday 2004-10-27 17:17:17 CEST
result=Monday 2004-11-01 00:00:00 CET
wanted=Monday 2004-11-01 00:00:00 CET