Per siteaccess timezone

Author Message

Carlos Revillo

Monday 25 February 2008 5:30:36 am

Hello. Is there any way to set diferent timezone for siteaccess?

I've been trying with

[TimeZoneSettings]
TimeZone=America/New_York

but it doesn't work.

curdate is showing the time for Europe/Madrid, exactly the one i have in my .htaccess file

php_value date.timezone Europe/Madrid

Only if i change php_value in .htaccess file i get what i need, but then, it doesn't work for spanish users (they are showed an "american" time).

Is there any way to do what i want?
Thank you.

Felix Laate

Monday 25 February 2008 5:49:06 am

Hi Carlos,

maybe this thread can help you: http://ez.no/developer/forum/install_configuration/timezone_on_php5_unstabel_version_solved/re_timezone_on_php5_unstabel_version_solved__5

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Carlos Revillo

Monday 25 February 2008 6:31:31 am

Thanks for your reply.

It works as expected if i put in settings/override/site.ini.append.php, but it doesn't work for settings/siteaccess/eng/site.ini.append.php

I'll try to explain better.
Now my .htaccess file looks like

php_value date.timezone Europe/Madrid

My settings/override/site.ini.append.php has this lines

[TimeZoneSettings]
TimeZone=America/Los_Angeles

my settings/siteaccess/eng/site.ini.append.php looks like

[TimeZoneSettings]
TimeZone=America/New_York

and last, settings/siteaccess/esl/site.ini.append.php looks like

[TimeZoneSettings]
TimeZone=Europe/Madrid

if a do

{currrendate("custom", ...)}

i get a GMT - 8 time, (Time for Los Angeles).

It seems like i cannot override this site in my siteaccess config?

Thanks again.

B. Nkengsong

Sunday 20 April 2008 10:48:41 am

Now !

What is the right ini section between [Date] and [TimeZoneSettings] for the <siteaccess>/site.ini.append.php settings file ?

Cheers

Sanagha Technologies Corp.
http://www.sanagha.com | http://www.sanagha.net | http://tourisphere.sanagha.net | http://education.sanagha.net
IT Consultant

André R.

Sunday 20 April 2008 11:06:38 am

'override' settings will always override siteaccess settings, so remove the setting from settings/override/*.ini* will most likely solve your problem.

Edit: Doesn't look like it is possible to set independent timezones pr siteaccess with ini settings, this is because the setting is set before eZ Publish figures out what siteaccess is being used, from index.php:

// Set correct site timezone
$timezone = $ini->variable( "TimeZoneSettings", "TimeZone");
if ( $timezone )
{
    putenv( "TZ=$timezone" );
}

You are free to create a enhancement issue on this one, but until it is fixed you can solve it by NOT having this setting in ini files (or set it to empty value). And set it directly in php in a file called config.php in the root of you install. This file is included in autoload.php so you should use pure php to accomplish it (eZ Publish classes aren't loaded yet at this stage).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Carlos Revillo

Monday 21 April 2008 3:28:13 am

I see. Thank you very much for your reply.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.