Time Zone Error in Cake php
PHP Warning: 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/Los_Angeles' for '-8.0/no DST' instead in C:\xampp\htdocs\cake_1_2\cake\libs\cache.php on line 429
Warning in cake to resolve this you have to follow this path.
Yourfoldername/cake/libs/cache.php
Open this file
Press ctrl+g and go line no. 570
You will find the code like this
if (!is_numeric($this->settings['duration'])) {
$this->settings['duration'] = strtotime($this->settings['duration']) - time();
}
return true;
simply paste this code: date_default_timezone_set('UTC');
Example:
if (!is_numeric($this->settings['duration'])) {
date_default_timezone_set('UTC');
$this->settings['duration'] = strtotime($this->settings['duration']) - time();
}
return true;
now check your website problem has been solved.
Comments
Post a Comment