MyBB Community Forums

Full Version: Adjust for incorrect server time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I've got a site hosted on a server, but I don't have access to change the time settings.
Could this be adjusted in MyBB so that the time zones would be correct?
Yes you can change time zome on your forum in your ACP.

Board settings-->Settings-->Date and Time Formats
(2011-02-22, 08:33 AM)JovanJ. Wrote: [ -> ]Yes you can change time zome on your forum in your ACP.

Board settings-->Settings-->Date and Time Formats

True, except that those time zones do not correspond to the actual values. Eg. GTM-8 is GMT.
if you're changing it in the ACP. it will not affect current memebrs, only new members and guests, you have to change it in the UserCP.
I am not sure you understand.

The time displayed when selecting GMT-8 is what should be displayed when GMT is selected.

This is a source of confusion for users wanting to select their time zone.
So you're saying that when users choose a timezone in their User CP (not the ACP setting) the time is incorrect?? If so, you'll need to ask your host to fix the server time.
That is exactly the issue, but the host won't change the server time.
Is there no workaround?
If the host won't change the time to the correct time/timezone it should give you a pretty clear picture of the kind of service they are providing. Why they would want to run a server with incorrect time is beyond me.
My suggestion to you would be to find a better host.
Code modification:
open inc/functions.php, find
	if(empty($stamp))
	{
		$stamp = TIME_NOW;
	}
Add after
$stamp += 9999;
where "9999" is the time to offset in seconds.
So, for example, if your server is 1 hour ahead, and you need to turn all timestamps back 1 hour, use this:
$stamp += -3600;

* may have side effects
(2011-02-24, 08:18 AM)cedeel Wrote: [ -> ]That is exactly the issue, but the host won't change the server time.
Is there no workaround?

Yeah, change hosts. If they're not going to correct the server time even though it's wrong they sound like a pretty poor host to me.