xref: /php-src/ext/date/tests/bug34087.phpt (revision 1394b48d)
1--TEST--
2Bug #34087 (strtotime() does not work with date format "Y/m/d")
3--FILE--
4<?php
5date_default_timezone_set("UTC");
6echo "Y/m/d: ", strtotime("2005/8/12"), "\n";
7echo "Y-m-d: ", strtotime("2005-8-12"), "\n";
8
9echo date(DATE_ISO8601, strtotime("2005/1/2")), "\n";
10echo date(DATE_ISO8601, strtotime("2005/01/02")), "\n";
11echo date(DATE_ISO8601, strtotime("2005/01/2")), "\n";
12echo date(DATE_ISO8601, strtotime("2005/1/02")), "\n";
13?>
14--EXPECT--
15Y/m/d: 1123804800
16Y-m-d: 1123804800
172005-01-02T00:00:00+0000
182005-01-02T00:00:00+0000
192005-01-02T00:00:00+0000
202005-01-02T00:00:00+0000
21