#34087 [Asn->Csd]: strtotime() does not work with date format "Y/m/d"
| From: | derick@php.net | Date: | Wed, 31 Aug 2005 12:37:25 +0000 |
| Subject: | #34087 [Asn->Csd]: strtotime() does not work with date format "Y/m/d" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84236@lists.php.net to get a copy of this message | ||
ID: 34087
Updated by: derick@php.net
Reported By: osmium at 163 dot com
-Status: Assigned
+Status: Closed
Bug Type: Date/time related
Operating System: *
PHP Version: 5CVS-2005-08-08
Assigned To: derick
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-08-12 09:24:52] osmium at 163 dot com
I'm so sorry for ignoring that. You know, "Y/m/d" works in v4.3 and
v5.0, so I took it for granted.
And I thought "Y/m/d" is still widely used in this world.
------------------------------------------------------------------------
[2005-08-12 08:48:59] derick@php.net
It's very easy to add though.
------------------------------------------------------------------------
[2005-08-12 03:08:37] osmium at 163 dot com
Description:
------------
I got nothing on the first line but a number "1123804800" on the second
line. Maybe format "Y/m/d" is not supported by strtotime().
However, I got two numbers in v5.0.3
Reproduce code:
---------------
<?php
echo "Y/m/d: ", strtotime("2005/8/12"), "<br>";
echo "Y-m-d: ", strtotime("2005-8-12");
?>
Expected result:
----------------
Y/m/d: 1123804800
Y-m-d: 1123804800
Actual result:
--------------
Y/m/d:
Y-m-d: 1123804800
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34087&edit=1