1 (edited by cows 2006-08-16 14:41)

Topic: Time Zones

Hello,

I have my time zone set up and its not working. The time is about 4 hours ahead of my time.  Why is this wronge?  I have it set to -6 and my clock for windows is set to -6 and my windows clock is correct.

Cows

2

Re: Time Zones

You need to set the timezone based on the server time, not your personal computer's time.

3

Re: Time Zones

How do I find out my server's timezone?

4 (edited by Smartys 2006-08-16 21:01)

Re: Time Zones

Set the time in your profile to 0 GMT. Then mess with the timezone until time displays as GMT. Then edit your profile to -6.
(This is the way you want if you don't want to mess with other things: otherwise, date('Z') / 3600 in a PHP script should tell you the correct server timezone)

Re: Time Zones

Is there anyway to set up a default time zone?  its working find for our members here but not for people who don't registered (guest)...

Thanks!

Martin

Re: Time Zones

Setting the server timezone will set the displayed time for Guests to GMT. If you want Guests to have a different timezone, you'll have to wait for 1.3 or make some modifications

7 (edited by naitkris 2007-03-17 19:44)

Re: Time Zones

or you can replace everywhere that time() exists to $currenttime (this is a lot of files just a warning!), where in common.php it is:

$hoursDifferenceToServer = 6; // or whatver hour difference your site is to the server (6 for +6 hours, -3 for -3 hours etc)
$currenttime = time() + ($hoursDifferenceToServer * 3600);

in functions where time is normally called you will need to have $currenttime as a global variable though for it to work also. i have done this for a forum that is Ireland-based (GMT) but hosted on a US server (GMT-6) - which now means that any visitor / new users will see default time as GMT (correct!) rather than GMT-6 (incorrect!) which is best as 90% or so of users are in Ireland (GMT).