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.

eZ debug

Timing: Jan 18 2025 10:22:37
Script start
Timing: Jan 18 2025 10:22:37
Module start 'layout'
Timing: Jan 18 2025 10:22:37
Module start 'content'
Timing: Jan 18 2025 10:22:37
Module end 'content'
Timing: Jan 18 2025 10:22:37
Script end

Main resources:

Total runtime0.0189 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.0000152.6094
Module start 'layout' 0.00740.0037 741.609439.4141
Module start 'content' 0.01110.0056 781.023497.3984
Module end 'content' 0.01680.0021 878.421938.3047
Script end 0.0188  916.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002714.2917140.0002
Check MTime0.00126.3351140.0001
Mysql Total
Database connection0.00158.034910.0015
Mysqli_queries0.004322.608430.0014
Looping result0.00000.106210.0000
Template Total0.00178.810.0017
Template load0.00094.717610.0009
Template processing0.00084.097110.0008
Override
Cache load0.00063.381810.0006
General
dbfile0.00147.251480.0002
String conversion0.00000.053140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs