Re: date() on two diff. servers

From: Date: Mon, 09 Dec 2002 02:56:43 +0000
Subject: Re: date() on two diff. servers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127465@lists.php.net to get a copy of this message
Hi, Monday, December 9, 2002, 11:59:07 AM, you wrote: JF> Hi, JF> I'm running the following code on two servers: JF> <? JF> $stamp = 1039525200; JF> echo date('D, d M Y',$stamp); ?>> JF> On my local development box (Free BSD, PHP 4.1.1, on AUSTRALIAN time), the JF> above echo's "Wed, 11 Dec 2002" (I consider this to be the "correct JF> date". JF> However on the live server (Red Hat, PHP 4.2.3, hosted in CANADA) the above JF> code echo's "Tue, 10 Dec 2002". JF> Now, what could be causing this problem? IMHO, no matter where you are in JF> the world (or more to the point, what timezone you are in), 1039525200 JF> seconds after a certain date (in this case the unix epoch) should be another JF> certain date, yes? JF> What could be causing this difference? What should I talk to my host about, JF> or look for? JF> Thanks, JF> Justin French JF> -------------------- JF> http://Indent.com.au JF> Web Development & JF> Graphic Design JF> -------------------- Put this at the top of your page $tz = getenv('TZ'); if($tz != 'Australia/Brisbane') putenv("TZ=Australia/Brisbane"); -- regards, Tom

« previous php.general (#127465) next »