#47120 [Opn->Asn]: strtotime() does not assume current year for strings like "24.2"
| From: | tony2001@php.net | Date: | Tue, 10 Feb 2009 10:51:32 +0000 |
| Subject: | #47120 [Opn->Asn]: strtotime() does not assume current year for strings like "24.2" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133662@lists.php.net to get a copy of this message | ||
ID: 47120
Updated by: tony2001@php.net
Reported By: poczta at kab-tech dot pl
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: *
PHP Version: 5.2.8
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2009-01-16 00:41:56] poczta at kab-tech dot pl
Description:
------------
Function "strtotime" don't work for some event.
Reproduce code:
---------------
//incorrect
$data_po = "24.2";
$po = strtotime($data_po);
echo $po;
//correct
$data_po = "24.2.2009";
$po = strtotime($data_po);
echo $po;
//for $data_po = "01.02"; to $data_po = "23.02";
//work OK
Expected result:
----------------
Something like: 1232118060
Actual result:
--------------
empty field
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47120&edit=1