Upgrading to a new server, I two repeated errors:
Warning: strtotime() [function.strtotime]: 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/New_York' for 'EST/-5.0/no DST' instead in...
and
Warning: date() [function.date]: 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/New_York' for 'EST/-5.0/no DST' instead in
How do I go about fixing these?
Code in question is this:
'date' => date("Y-M-d",strtotime($Array['_dateCreated'])),
I've tried putting this in an include at the top of all my pages:
<?php
date_default_timezone_set('America/New_York');
?>
Thanks in advance for your help.
php-cli
'sphp.ini
file is different thenapache2
'sphp.ini
file. I suggest symbolic linking one to another to keep them in sync and avoid confusion! – recursion.ninja