#47431 [Opn->Bgs]: Documentation misleading about time format

From: Date: Thu, 19 Nov 2009 12:16:49 +0000
Subject: #47431 [Opn->Bgs]: Documentation misleading about time format
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3240@lists.php.net to get a copy of this message
ID: 47431 Updated by: vrana@php.net Reported By: yamikuronue at gmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Windows XP running apache PHP Version: Irrelevant New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #36474. Previous Comments: ------------------------------------------------------------------------ [2009-02-18 11:15:32] rquadling@php.net I just did a quick test using every ASCII character as a separator. Only 3 produced a non 1970 date... 05-01-2012 => January 5th, 2012 05.01.2012 => January 5th, 2012 05/01/2012 => May 1st, 2012 Odd indeed. ------------------------------------------------------------------------ [2009-02-18 01:42:21] yamikuronue at gmail dot com Description: ------------ The documentation claims that strtotime assumes US-English format; however, when the fields are separated with dashes, it reverts to UK-English format. Reproduce code: --------------- $ICDate = "05-01-2012"; //actual code read from a file $ICtimestamp = strtotime($ICDate); $date = date ("F jS, Y", $ICtimestamp); print $date; //actual code parsed through a template to display on a webpage Expected result: ---------------- "May 1st, 2012" Actual result: -------------- "January 5th, 2012" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47431&edit=1

« previous php.doc.bugs (#3240) next »