#47120 [Opn->Csd]: strtotime() does not assume current year for strings like "24.2"
ID: 47120
Updated by: derick@php.net
Reported By: poczta at kab-tech dot pl
-Status: Open
+Status: Closed
Bug Type: Date/time related
Operating System: *
PHP Version: 5.2.8
Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2009-02-10 11:26:21] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
This format is simply not supported.
------------------------------------------------------------------------
[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
Thread (4 messages)