Re: date wierdness

From: Date: Fri, 03 May 2002 17:39:49 +0000
Subject: Re: date wierdness
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95941@lists.php.net to get a copy of this message
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)); GMT? Add/subtract the appropriate number of hours for your time zone and see what happens. Or at least print out date(D, M d, Y H:i:s). miguel

« previous php.general (#95941) next »