]> granicus.if.org Git - php/commitdiff
Added test for bug #34087
authorIlia Alshanetsky <iliaa@php.net>
Wed, 17 Aug 2005 15:31:57 +0000 (15:31 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 17 Aug 2005 15:31:57 +0000 (15:31 +0000)
ext/date/tests/bug34087.phpt [new file with mode: 0644]

diff --git a/ext/date/tests/bug34087.phpt b/ext/date/tests/bug34087.phpt
new file mode 100644 (file)
index 0000000..86de82d
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #34087 (strtotime() doesn't parse "yyyy/m?m/d?d" format)
+--FILE--
+<?php
+       date_default_timezone_set("GMT");
+       echo date(DATE_ISO8601, strtotime("2005/1/2"));
+       echo "\n";
+       echo date(DATE_ISO8601, strtotime("2005/01/02"));
+       echo "\n";
+       echo date(DATE_ISO8601, strtotime("2005/01/2"));
+       echo "\n";
+       echo date(DATE_ISO8601, strtotime("2005/1/02"));
+       echo "\n";
+?>
+--EXPECT--
+2005-01-02T00:00:00+0000
+2005-01-02T00:00:00+0000
+2005-01-02T00:00:00+0000
+2005-01-02T00:00:00+0000