time in annother zone
| From: | Justin French | Date: | Mon, 10 Sep 2001 06:07:00 +0000 |
| Subject: | time in annother zone | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-66670@lists.php.net to get a copy of this message | ||
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