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
 [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 10:01:32 2025 UTC