09-26-2007, 12:22 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
|
Users Timezone
Hey, hope all are well. I have a question.
My project is pretty big, and can only hope for global success. Currently all the times on the website are using the server's clock, which is 6 hours behind my clock (It's in the USA and I'm in the UK). I will allow my users to set there timezone via a select menu, the same as a lot of forums (including this one) use in it's control panel. I'll be storing the value in the 'member' table.
What I'm not 100% sure on is how to use the value to display the time in their timezone. My timezone would be '0 - GMT' but with the server time been six hours behind my clock, would I add '+6' instead? When I output a time, I want it to be the time in their timezone, so, my first though was to do something like this:
Code:
echo date('D M, Y' time()+$row->timezone);
If anyone has any discussions on this, I look forward to hearing them :)
P.S. Hope I made sense :P
__________________
Not quite a n00b...
|
|
|
|