Re: Unix date
| From: | Børge Holen | Date: | Fri, 28 Dec 2007 18:45:12 +0000 |
| Subject: | Re: Unix date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266326@lists.php.net to get a copy of this message | ||
On Friday 28 December 2007 16:46:46 tedd wrote:
> Hi gang:
>
> Using:
>
> $unix_in = 1255845600;
>
> echo(date("M d, Y h:i:s a",$unix_in));
>
> On one sever, produces: Oct 18, 2009 02:00:00 am
>
> But on another sever, produces: Oct 18, 2009 12:00:00 am
>
> This difference appears to be a combination of "time-zone" and
> "daylight-savings" considerations. In other words, the function
> date() looks at the server's time (whatever that is set for, right or
> wrong) and uses that for the calculation.
>
> So, what's the best method in keeping things consistent across
> servers? Is there one?
I almost took to a baseballbat, till I remembered to change php.ini to co run
two servers. Of course doing this in severeal servers all across the world
probably would result in some timeerror somewhere, but it did the job for me
EASY!!
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com
> http://ancientstones.com
> http://earthstones.com
--
---
Børge Holen
http://www.arivene.net