From: Ilia Alshanetsky Date: Thu, 22 Mar 2007 23:34:14 +0000 (+0000) Subject: Added -- test case X-Git-Tag: php-5.2.2RC1~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57a88f71d51caf1ff81e78da7f37344f4b5dd98d;p=php Added -- test case --- diff --git a/ext/date/tests/bug40861.phpt b/ext/date/tests/bug40861.phpt index 8331bd32d0..de18b0e34e 100644 --- a/ext/date/tests/bug40861.phpt +++ b/ext/date/tests/bug40861.phpt @@ -14,6 +14,12 @@ $ts = strtotime('2000-01-01 12:00:00'); $result = date("Y-m-d H:i:s", strtotime("+$offset minutes", $ts)); echo $result . "\n"; +$offset = -60; +$ts = strtotime('2000-01-01 12:00:00'); +$result = date("Y-m-d H:i:s", strtotime("-$offset minutes", $ts)); +echo $result . "\n"; + + $offset = 60; $ts = strtotime('2000-01-01 12:00:00'); $result = date("Y-m-d H:i:s", strtotime("+$offset minutes", $ts)); @@ -23,4 +29,5 @@ echo $result . "\n"; --EXPECT-- 2000-01-01 13:00:00 2000-01-01 11:00:00 +2000-01-01 11:00:00 2000-01-01 13:00:00