summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2004-04-04 12:42:13 +0000
committerDerick Rethans <derick@php.net>2004-04-04 12:42:13 +0000
commit794846e5c52c46b6a7ae03c28a1619974ec3ef06 (patch)
tree422f3629aa71006687f5c7a44d840bb9641d4290
parent8fd505f4b4fc899bc2bd439eb624b1691e056989 (diff)
downloadphp-git-794846e5c52c46b6a7ae03c28a1619974ec3ef06.tar.gz
- One more test for a date/time related bug.
-rw-r--r--ext/standard/tests/time/bug21966.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/standard/tests/time/bug21966.phpt b/ext/standard/tests/time/bug21966.phpt
new file mode 100644
index 0000000000..637a957f2d
--- /dev/null
+++ b/ext/standard/tests/time/bug21966.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #21966 (date() or mktime() returning bad value for mktime month param of '2')
+--FILE--
+<?php
+putenv("TZ=Europe/London");
+
+echo '27/3/04 = ' . strval(mktime(00,0,0,3,27,2004)) . "\n"; // 1080345600
+echo '28/3/04 = ' . strval(mktime(0,0,0,3,28,2004)) . "\n"; // -3662 - should be 108042840
+echo '28/3/04 = ' . strval(mktime(2,0,0,3,28,2004)) . "\n"; // 1080435600
+echo '29/3/04 = ' . strval(mktime(0,0,0,3,29,2004)) . "\n"; // 1080514800
+echo '30/3/04 = ' . strval(mktime(0,0,0,3,30,2004)) . "\n"; // 1080601200
+
+?>
+--EXPECT--
+27/3/04 = 1080345600
+28/3/04 = 1080432000
+28/3/04 = 1080435600
+29/3/04 = 1080514800
+30/3/04 = 1080601200