php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #33105 strtotime is unclear on date format
Submitted: 2005-05-23 01:10 UTC Modified: 2005-06-06 19:51 UTC
From: neothermic at neothermic dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevent
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: neothermic at neothermic dot com
New email:
PHP Version: OS:

 

 [2005-05-23 01:10 UTC] neothermic at neothermic dot com
Description:
------------
On the strtotime man page ( http://www.php.net/strtotime ), the function is indicated as assuming the date is 'English date format'. This is unclear in the sense that the function actually works in US date format, not UK date format (which is an interperation of the word English).

In the phpdoc channel, it was suggested that the word 'English' either be elaborated, or outright replaced with 'US English' to avoid any future confusion.

Reproduce code:
---------------
<?PHP 

$input = '20/04/05';

$date = strtotime($input);

echo date('r', $date);

?>

Expected result:
----------------
Wed, 20 Apr 2005 00:00:00 +0100

Actual result:
--------------
Fri, 4 Aug 2006 00:00:00 +0100

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-06 19:51 UTC] dmytton@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 14:01:31 2025 UTC