PHP strftime errors in Smarty
Ever since I upgraded to PHP 5.3.0, I've been getting errors in my error log that look like this...
PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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...
The error is being caused by the /modifier.date_format.php file which is part of the Smarty templating system. If you're getting these errors and you want to stop them from happening, the easiest way is to edit your php.ini file to include a date.timezone setting.
Since in my case it said it was using America/Denver, I added the following line to my php.ini file:
date.timezone = America/Denver
Once I did this and I restarted my server, the error messages went away.
PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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...
The error is being caused by the /modifier.date_format.php file which is part of the Smarty templating system. If you're getting these errors and you want to stop them from happening, the easiest way is to edit your php.ini file to include a date.timezone setting.
Since in my case it said it was using America/Denver, I added the following line to my php.ini file:
date.timezone = America/Denver
Once I did this and I restarted my server, the error messages went away.
| Rating: | no ratings, 0 total Votes |
| Categories: | PHP Smarty programming configuration |
| Added: | on Nov 03, 2009 at 3:04 pm |
| Added By: | an anonymous user |
| Searches: | php error smarty programming configuration |

