How to fix forum time

strongarm_playa

Active member
I have my forum time set for Eastern Standard time, but for some odd reason, all posts, comments and status' are showing a different time. I have looked into this and still yet I can not seem to find a solution. Any help would be greatly appreciated. Thanks.
 
The forum time will be affected by the server time.

If your timezone etc. is correct then the server time will be wrong. You may need your hosts to alter this.
 
To debug the server time you could add this to your PAGE_CONTAINER template near the top.

Code:
<xen:if is="{$visitor.is_admin}">{xen:datetime $serverTime, 'absolute'}</xen:if>

That will display the current server time in your timezone. If it displays wrong, it's definitely a server problem.
 
Contacted my host on server time issue. All time is central time, but its not even displaying central time. Its way off... almost a full day off. But they gave me a php code to use but I do not know where to install this code.
 
Can I change the server clock or time zone?

The server clock is set to Central Standard Time. You cannot change the time on a shared server's clock.
You can change the time zone being displayed with a PHP script. (Unfortunately, I cannot tell you where to put this code. You will need to consult with the program developer.) Here are two sample codes:
==================================================
<?php
putenv("TZ=Europe/Amsterdam");
?>
==================================================
<?php
date_default_timezone_set("America/Los_Angeles");
?>
==================================================
You can set the timezone in .htaccess as well. (You can create a New File and name it ".htaccess", or you can edit the existing one. The .htaccess file belongs in /public_html/ - or a subdirectory if for a subdomain or addon domain). Add the line:
==================================================
SetEnv TZ America/Indianapolis
==================================================

Note: I tried to make changes to the ".htaccess" file but I cant access the file
 
To debug the server time you could add this to your PAGE_CONTAINER template near the top.

Code:
<xen:if is="{$visitor.is_admin}">{xen:datetime $serverTime, 'absolute'}</xen:if>

That will display the current server time in your timezone. If it displays wrong, it's definitely a server problem.

I added this code, as it was recommended above and the time is 5 hrs ahead of Eastern Standard Time...

This is annoying and im having a hard time trying to find an answer.
 
Top Bottom