1
votes

I just copied all cakephp file to my localhost (I am using latest XAMPP), when I run cake I am getting a bunch of warnings like

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 'Asia/Calcutta' for '5.5/no DST' instead in D:\xampp\htdocs\cake\cake1\cake\libs\cache.php on line 448

What is this and how can I fix it ?

Thanks a lot guys

2
guys, I fixed this problem by adding date_default_timezone_set('Asia/Calcutta'); into my core.php file, but still I didn't understand why should I enter it here and why I got those warnings :(joel

2 Answers

3
votes

/app/config/core.php:

/**
 * If you are on PHP 5.3 uncomment this line and correct your server timezone
 * to fix the date & time related errors.
 */
    //date_default_timezone_set('UTC');

You are required to set this since the behavior of time related functions changed in PHP 5.3.

0
votes

In D:\xampp\php\php.ini you need to set the date.timezone setting.