summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2004-04-08 16:17:35 +0000
committerDerick Rethans <derick@php.net>2004-04-08 16:17:35 +0000
commitb91a947d5eb427cd61c982061d1c3c4498dc6824 (patch)
tree7ab8aabddeb6491c9390eaf8aa36f2536db7bbdd
parent5d3900a2e9ce257aef0d839e54b3c0bcecb1451a (diff)
downloadphp-git-b91a947d5eb427cd61c982061d1c3c4498dc6824.tar.gz
- Added test and not the diff ;-)
-rw-r--r--ext/standard/tests/time/bug20382.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/standard/tests/time/bug20382.phpt b/ext/standard/tests/time/bug20382.phpt
new file mode 100644
index 0000000000..4da8c21105
--- /dev/null
+++ b/ext/standard/tests/time/bug20382.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #20382 (strtotime ("Monday", $date) produces wrong result on DST changeover)
+--FILE--
+<?php
+ putenv("TZ=Europe/Amsterdam");
+ $tStamp = mktime (17, 17, 17, 10, 27, 2004);
+ echo "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n";
+
+ $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";
+?>
+--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