1

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

1
  • 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 :( Commented Dec 13, 2010 at 11:20

2 Answers 2

3

/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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.