php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47120 strtotime() does not assume current year for strings like "24.2"
Submitted: 2009-01-16 00:41 UTC Modified: 2009-02-10 11:34 UTC
From: poczta at kab-tech dot pl Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.2.8 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: poczta at kab-tech dot pl
New email:
PHP Version: OS:

 

 [2009-01-16 00:41 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-10 11:26 UTC] 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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 20:01:32 2025 UTC