Server Time Offset

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
TonyP
Forum Members
Forum Members
Posts: 19
Joined: Tue Dec 19, 2006 8:41 pm

Server Time Offset

Post by TonyP »

Hi all,

Does anyone know whether there is a way to offset the time displayed by CMSMS from the server time?

My server is in PST and my site is used by people in EST so everything (news items etc) show up as being posted 3 hours before they actually were.

I don't see anything in the admin panel or config file that allows this.

Thanks,

T.
cyberman

Re: Server Time Offset

Post by cyberman »

Have you tried to set locale value in config.php?
TonyP
Forum Members
Forum Members
Posts: 19
Joined: Tue Dec 19, 2006 8:41 pm

Re: Server Time Offset

Post by TonyP »

Thaks for the quick reply cyberman. I did notice that line in config.php but don't know what the options are. Do you know what the $config['locale'] param would be for eastern standard time?
cyberman

Re: Server Time Offset

Post by cyberman »

Take a locale for a country that uses eastern standard time.

For instance - if I wanna german settings I'm including de_DE at the named line.
TonyP
Forum Members
Forum Members
Posts: 19
Joined: Tue Dec 19, 2006 8:41 pm

Re: Server Time Offset

Post by TonyP »

I fixed it by adding the following line to my .htaccess file:

SetEnv TZ location

Where location is selected from a list here - http://www.php.net/manual/en/timezones.php

So in my case the line added was:

SetEnv TZ America/Toronto
cyberman

Re: Server Time Offset

Post by cyberman »

Thx for that.
Post Reply

Return to “CMSMS Core”