Problems with timezone

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Problems with timezone

Postby diego182 » 29. September 2009 05:06

Hello people

I've setup XAMPP 1.7.2a on mac MAC OSX 10.6.1 and I've got a problem with cake

Code: Select all
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/Sao_Paulo' for 'BRT/-3.0/no DST' instead in /Users/diego182/Sites/cake/cake/libs/cache.php on line 429


i've already tried put this configuration below on php.ini file as i have seen it on some topics on the internet but it did not solve the problem

Code: Select all
[Date]
date.timezone = 'America/Sao_Paulo'


Thanks in advence.
diego182
 
Posts: 2
Joined: 29. September 2009 03:58

Re: Problems with timezone

Postby MegaChriz » 29. September 2009 12:58

I always use the function date_default_timezone_set() in my projects. I call this function very early in the workflow, so this function is called before I include my php-classes.
Code: Select all
// This function works since PHP 5.1
if (function_exists('date_default_timezone_set'))
{
    date_default_timezone_set('America/Sao_Paulo');
}
MegaChriz
 
Posts: 158
Joined: 16. February 2009 15:04
Location: Amersfoort, The Netherlands
Operating System: Mac OS X

Re: Problems with timezone

Postby diego182 » 29. September 2009 14:46

Humm it did solve my problem but if there were something that could be dann on php.ini i would think that its better

Edit

After delete XAMPP and try to execute (with PHP CLI) i figure out that my application were using the mac osx default php and not the XAMPP php so i fix it by using XAMPP PCP CLI
diego182
 
Posts: 2
Joined: 29. September 2009 03:58


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 5 guests