Re: time in annother zone

From: Date: Mon, 10 Sep 2001 07:17:30 +0000
Subject: Re: time in annother zone
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66676@lists.php.net to get a copy of this message
just use GMT it is much simpler.... just kidding <?PHP $test = getenv("DATE_LOCAL"); print("$test"); ?> ----- Original Message ----- From: "Justin French" <justin@indent.com.au> To: "php" <php-general@lists.php.net> Sent: Monday, September 10, 2001 2:07 AM Subject: [PHP] time in annother zone > Greetings, > > I've been to the online manual relating to both date() and time(), and > i've read all the user-added notes, and i'm actually MORE confused now > than I was before I started!! > > > My ISP is based in Ontario, Canada. Myself, and 90% of my users are > based in Australia (Sydney/Melbourne time). > > > I'm trying to show what time a post was added to a message board. It's > easy enough using date(), but it shows the server's local time (of > course), not the current time in Australia. > > > Now, I could easily find out how many seconds behind the ISP is, and > minus it from the unix timestamp, but I'm thinking there has to be an > easier way :) > > eg: > > <? > > $secondsDifference = "a really big number"; > > date("<your format string>",time() - $secondsDifference); > > ?> > > it could be setlocale(), or something else, i'm just not sure what to > make of it all. > > > > Many thanks in advance, > > Justin French > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#66676) next »