Re: date wierdness

From: Date: Fri, 03 May 2002 17:47:10 +0000
Subject: Re: date wierdness
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95942@lists.php.net to get a copy of this message
Long ago I saw this same thing and never did resolve it since the easier solution is to let MySQL format the date for you using DATE_FORMAT. Formatting the date using PHP tools from data derived from a query will just drive you nuts. There is some kind of "thing" that MySQL and PHP don't agree on and I just have no idea what. Weirdness indeed. Avoid it and live long and prosper. John On Fri, 3 May 2002, ROBERT MCPEAK wrote: >-On PHP3 where $row["art_date"] == 2002-05-03, >-$thedate resolves to "Thurs, May 2, 2002" >- >-YESTERDAYS DATE! >- >-See for yourself, if you wish, here: >-http://www.endvaw.org/current.php3 >- >-What gives. >- >-$row = mysql_fetch_array($result); >-$blah = eregi_replace("-", "/", $row["art_date"]); >-$thedate = date("D, M d, Y", strtotime($blah)); >- >--- >-PHP General Mailing List (http://www.php.net/) >-To unsubscribe, visit: http://www.php.net/unsub.php >- ************************************** John Huggins VANet jhuggins@va.net http://www.va.net/ **************************************

« previous php.general (#95942) next »