Forums / Install & configuration / It is not safe to rely on the system's timezone settings

It is not safe to rely on the system's timezone settings

Author Message

Softriva .com

Monday 10 December 2007 10:23:00 am

I am getting this error in both Linux and Windows. I tried to change my time to American-Central but no help.

Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for '-6.0/no DST' instead in C:\xampp\htdocs\lib\ezutils\classes\ezdebug.php on line 879

MAA MED

Monday 10 December 2007 10:49:46 am

Hi,

Try to set up the time zone in the php.ini

[Date]
date.timezone = "The appropriate time zone"

Seth Shoultes

Wednesday 12 December 2007 10:23:01 pm

I found a quick fix for this error. Here is a link to the video until I can get my Jing fixed.

http://www.screencast.com/users/sethshoultes/folders/Jing/media/e8178c87-a00e-4b2b-84c9-fc4be4450814

Here are the lines of code:

LIne: 879 in ezdebug.php

$time = "nan" /*strftime( "%b %d %y %H:%M:%S", strtotime( "now" ) )*/;

Line: 124 ezlog.php

/* $logFile = @fopen( $fileName, "a" );
if ( $logFile )
{
$time = strftime( "%b %d %Y %H:%M:%S", strtotime( "now" ) );
$logMessage = "[ " . $time . " ] [" . $dir . $name . "]\n";
@fwrite( $logFile, $logMessage );
@fclose( $logFile );
if ( !$fileExisted )
@chmod( $fileName, 0666 );
@umask( $oldumask );
}
*/

blabber -hand

Sunday 30 December 2007 8:53:23 pm

Thanks Seth! Your solution worked!! :)

I'm just wondering how the eZ Publish team will address this "problem." If it is not safe to rely on the system's timezone settings, why does the code seem to automatically do this (that is, rely on the system's timezone settings)? Surely, there must be a better way to handle this.

Btw, from what I've read on the net, eZ Publish seems to be the hands-down winner among the CMSs with regards to features and usability! So, double-thumbs up to the eZ Publish team! Thanks for making this open source! :)

André R.

Monday 31 December 2007 4:20:35 am

Read this thread for other ways to set timezone:
http://ez.no/developer/forum/install_configuration/timezone_on_php5_unstabel_version_solved

4.0beta introduced the possibility to set it from site.ini for those that don't have access to apache / php config files, this is also explained in the above url.

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

eZ debug

Timing: Jan 18 2025 19:13:03
Script start
Timing: Jan 18 2025 19:13:03
Module start 'content'
Timing: Jan 18 2025 19:13:04
Module end 'content'
Timing: Jan 18 2025 19:13:04
Script end

Main resources:

Total runtime0.7470 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9922180.7891
Module start 'content' 0.00660.5849 768.7813666.8984
Module end 'content' 0.59150.1554 1,435.6797337.0469
Script end 0.7469  1,772.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5509210.0002
Check MTime0.00160.2083210.0001
Mysql Total
Database connection0.00140.186710.0014
Mysqli_queries0.660888.45912060.0032
Looping result0.00230.30902040.0000
Template Total0.723296.820.3616
Template load0.00230.313320.0012
Template processing0.720896.494320.3604
Template load and register function0.00020.027110.0002
states
state_id_array0.00090.126410.0009
state_identifier_array0.00080.105120.0004
Override
Cache load0.00200.2627370.0001
Sytem overhead
Fetch class attribute can translate value0.00460.611660.0008
Fetch class attribute name0.00110.150460.0002
XML
Image XML parsing0.00140.192960.0002
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00991.3295280.0004
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs