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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → 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
You need to set the timezone based on the server time, not your personal computer's time.
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)
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
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
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).
PunBB Forums → PunBB 1.2 troubleshooting → Time Zones
Powered by PunBB, supported by Informer Technologies, Inc.