i am getting an error in the System Event log. The error is:
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/Los_Angeles’ for ’PDT/-7.0/DST’ instead
my usage of strftime() in my snippet is as follows:
$tmplvar_mission_date = strftime(’%m/%d/%Y’,$row2[’tmplvar_mission_date’]);
anybody had this issue before? may be no big deal - but it’s filling up the event log pretty quickly.
-
MODX Staff
- 10,725 Posts
Get someone to configure the timezone setting in your PHP configuration. It is not set in the default php.ini, but is a required setting.
thanks for the tip. this led me in the right direction.
fyi - if you cannot modify your ini file, you can also add this to the top of your php page:
date_default_timezone_set("America/Chicago");
this seemed to do the trick.
thanks