Re: Weird results for 2 lines of damn code

From: Date: Fri, 17 Oct 2003 01:22:40 +0000
Subject: Re: Weird results for 2 lines of damn code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-166383@lists.php.net to get a copy of this message
Hey Ryan, Just did a straight copy and paste of your code into a php page on my server. CODE: $ryan=strtotime ("now"); echo $ryan."<br>"; echo strftime("%G-%m-%a %H:%M:%S", $ryan)."<br>"; RESULT: 1066353488 2003-10-Thu 21:18:08 Seems to work fine for me...This seems to be a deeper problem than your code itself, probably having something to do with your computer or its libraries. Reading through www.php.net/strftime there were a few warnings about systems not conforming to ISO standards and doing quirky things. On Thu, 2003-10-16 at 21:11, Ryan A wrote: > Hi everyone, > This "very simple" program is driving me nuts, heres what i am doing: > 1.making a timestamp with the current time. > 2.reading from the timestamp and trying to "render" the date again > > $ryan=strtotime ("now"); echo $ryan."<br>"; > echo strftime( "%G-%m-%a %H:%M:%S", $ryan)."<br>"; > > This is the result: > -10-Fri 02:29:33 > > the month part,friday part and the time is correct....why no year? > Where am i going wrong? > > Cheers, > -Ryan

« previous php.general (#166383) next »