#47431 [Opn]: Documentation misleading about time format

From: Date: Wed, 18 Feb 2009 11:15:32 +0000
Subject: #47431 [Opn]: Documentation misleading about time format
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1901@lists.php.net to get a copy of this message
ID: 47431 Updated by: rquadling@php.net Reported By: yamikuronue at gmail dot com Status: Open Bug Type: Documentation problem Operating System: Windows XP running apache PHP Version: Irrelevant New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 (#1901) next »