Page 1 of 1
Odd error in logs related to /lib/smarty/Smarty_Compiler.class.php and date.time
Posted: Thu Jul 15, 2010 12:13 pm
by moorezilla
Code: Select all
[Thu Jul 15 07:22:14 2010] [error] PHP Strict Standards: strftime() [<a href='function.strftime'>function.strftime</a>]: 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/New_York' for 'EDT/-4.0/DST' instead in .../lib/smarty/Smarty_Compiler.class.php on line 400
I'm not entirely sure this is a cmsms issue, but I'm getting a lot of this error in my logs. Anyone know offhand if this is a cmsms issue, or a misconfiguration of some kind with the date on my server? Hitting date from the command line appears to give the appropriate time, date, and timezone for my location. Only reason I bring it up is that the error is always triggered (on my server any way) by the Smarty_Compiler.class.php in cmsms.
Using 1.8.1 cmsms
php 5.2.13
apache 2.x
mysql 5.x
Thanks,
am
Re: Odd error in logs related to /lib/smarty/Smarty_Compiler.class.php and date.time
Posted: Fri Jul 16, 2010 4:24 pm
by JeremyBASS
moorezilla wrote:
Code: Select all
[Thu Jul 15 07:22:14 2010] [error] PHP Strict Standards: strftime() [<a href='function.strftime'>function.strftime</a>]: 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/New_York' for 'EDT/-4.0/DST' instead in .../lib/smarty/Smarty_Compiler.class.php on line 400
I'm not entirely sure this is a cmsms issue, but I'm getting a lot of this error in my logs. Anyone know offhand if this is a cmsms issue, or a misconfiguration of some kind with the date on my server? Hitting date from the command line appears to give the appropriate time, date, and timezone for my location. Only reason I bring it up is that the error is always triggered (on my server any way) by the Smarty_Compiler.class.php in cmsms.
Using 1.8.1 cmsms
php 5.2.13
apache 2.x
mysql 5.x
Thanks,
am
You are right.. it's not really a cmsms issue.. thou the common issue I see on host is that the timezone identifier needs a single qoute around the zone.. just as it suggests. " 'America/New_York' "
hope that helps.. Cheers -Jeremy
Re: Odd error in logs related to /lib/smarty/Smarty_Compiler.class.php and date.time
Posted: Mon Aug 23, 2010 3:05 am
by Joesurf
I am getting this same type of error on my Fe-useres login page. Displayed to the user no less.
Using: CMS Made Simple 1.8.1
Strict Standards: strftime() [function.strftime]: 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/Denver' for 'MST/-7.0/no DST' instead in /home/content/m/m/a/mmains/html/CMS-MMA/lib/smarty/Smarty_Compiler.class.php on line 400
When I look at my Smarty_Compiler.class.php on line 400
I see no way to correct this.
// put header at the top of the compiled template
$template_header = "_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
$template_header .= " compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n";
Is there any way to fix this or at least turn the error notice off?
I found a post in German that looked as though it resolved the problem but I don't understand German unfortunately.
Your help is appreciated.
Using 1.8.1 cmsms
php 5.2.8
apache 2.x
mysql 5.x