summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug35456.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug35456.phpt')
-rw-r--r--ext/date/tests/bug35456.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/date/tests/bug35456.phpt b/ext/date/tests/bug35456.phpt
new file mode 100644
index 0000000..6432b99
--- /dev/null
+++ b/ext/date/tests/bug35456.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #35456 (+ 1 [time unit] format did not work)
+--FILE--
+<?php
+date_default_timezone_set("UTC");
+
+$t = 1133216119;
+
+echo date(DATE_ISO8601, strtotime("+ 1 day", $t)) . "\n";
+echo date(DATE_ISO8601, strtotime("+ 1 month", $t)) . "\n";
+echo date(DATE_ISO8601, strtotime("+ 1 week", $t)) . "\n";
+?>
+--EXPECT--
+2005-11-29T22:15:19+0000
+2005-12-28T22:15:19+0000
+2005-12-05T22:15:19+0000