Timezone doesn't work

Author Message

Matthew Carroll

Tuesday 02 October 2007 8:44:37 pm

I've set timezone in site.ini as per http://ez.no/doc/ez_publish/technical_manual/3_9/reference/configuration_files/site_ini/timezonesettings/timezone but the following code produces the date in the server's timezone, not the ini setting timezone:

{currentdate()|datetime( 'custom', '%F %j, %Y' )}

Any ideas what I'm missing? How can I generate the current date as per the ini setting?

Thanks
Matthew

http://carroll.org.uk

paul bolger

Tuesday 02 October 2007 9:17:21 pm

Paul Bolger

Matthew Carroll

Tuesday 02 October 2007 9:32:52 pm

Thanks Paul. I read that link you posted. Unfortunately that's not an option, as this ez codebase is shared by a number of sites, not all of which are for the same timezone.

Seems to me there isn't much point having a timezone setting if ez doesn't use it. (Or maybe it does other things with it?)

http://carroll.org.uk

paul bolger

Thursday 18 October 2007 3:30:26 pm

Hi Matthew

This works for me. (ezpublish 3.9.3 and 3.10.0)

/settings/override/site.ini.append.php

[TimeZoneSettings]
TimeZone=Australia/Darwin

Paul Bolger

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 19 2025 15:18:06
Script start
Timing: Jan 19 2025 15:18:06
Module start 'layout'
Timing: Jan 19 2025 15:18:06
Module start 'content'
Warning: PHP: E_WARNING Jan 19 2025 15:18:06
DOMDocument::loadXML(): Opening and ending tag mismatch: literal line 2 and paragraph in Entity, line: 6 in /home/ze/public_html/share.se7enx.com/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php on line 174
Warning: PHP: E_WARNING Jan 19 2025 15:18:06
DOMDocument::loadXML(): Opening and ending tag mismatch: paragraph line 2 and section in Entity, line: 15 in /home/ze/public_html/share.se7enx.com/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php on line 174
Timing: Jan 19 2025 15:18:06
Module end 'content'
Timing: Jan 19 2025 15:18:06
Script end

Main resources:

Total runtime0.7897 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 590.2813152.6250
Module start 'layout' 0.00560.0033 742.906339.4453
Module start 'content' 0.00890.7794 782.3516553.9766
Module end 'content' 0.78830.0013 1,336.328112.3828
Script end 0.7897  1,348.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4513160.0002
Check MTime0.00130.1699160.0001
Mysql Total
Database connection0.00070.089810.0007
Mysqli_queries0.737893.4254600.0123
Looping result0.00040.0565580.0000
Template Total0.759096.120.3795
Template load0.00190.242220.0010
Template processing0.757095.863920.3785
Template load and register function0.00010.016310.0001
states
state_id_array0.00090.119710.0009
state_identifier_array0.00090.115820.0005
Override
Cache load0.00160.1988210.0001
Sytem overhead
Fetch class attribute can translate value0.00050.065420.0003
Fetch class attribute name0.00090.110660.0001
XML
Image XML parsing0.00290.367420.0015
class_abstraction
Instantiating content class attribute0.00000.002180.0000
General
dbfile0.00420.5330220.0002
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs