php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33578 Problem with strtotime method
Submitted: 2005-07-05 23:18 UTC Modified: 2005-07-20 12:19 UTC
From: jeremy at techtrav dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.1.X newest CVS OS: Windows XP Apache 2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeremy at techtrav dot com
New email:
PHP Version: OS:

 

 [2005-07-05 23:18 UTC] jeremy at techtrav dot com
Description:
------------
I just updated from 5.0.4 to 5.1.0b2 to test on my windows box. strtotime seems to be very messed up returning compeletely wrong dates.

Reproduce code:
---------------
<?
	echo date('m/d/Y', strtotime('Oct 11'));
	echo '<br>';
	echo date('m/d/Y', strtotime('11 Oct'));
	echo '<br>';
	echo date('m/d/Y', strtotime('11 Oct 2005'));
?>

Expected result:
----------------
10/11/2005
10/11/2005
10/11/2005

Actual result:
--------------
10/10/2005
07/05/2005
10/10/2005

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-05 23:22 UTC] derick@php.net
Indeed it does not parse "11 Oct" anymore, I'll fix this.
 [2005-07-05 23:33 UTC] derick@php.net
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.


 [2005-07-11 17:35 UTC] jeremy at techtrav dot com
You did fix "11 Oct" but you didn't fix "11Oct" which also used to work.  this returns 01/01/1970

11Oct is an important format to have working, as it is the format that many use in the travel industry.
 [2005-07-11 18:55 UTC] derick@php.net
Ok, I'll add that too.
 [2005-07-20 12:19 UTC] derick@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC