Jump to content

Warning: date() [function.date]: It is not safe to rely on the system's timezone


ballhogjoni

Recommended Posts

So I set the date.timezone in php.ini and restarted the server but I still get this warning:

 

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

 

This is what I set it to date.timezone = "America/New_York"

Then you didn't set it in the right place. Are you sure it was the right php.ini? What does phpinfo() say about the INI files parsed (at the top) and the various settings (in a big section later)?

Then you didn't set it in the right place. Are you sure it was the right php.ini? What does phpinfo() say about the INI files parsed (at the top) and the various settings (in a big section later)?

 

according to php_info the loaded conf file is /private/etc/php.ini and thats the one I changed.

ok so the problem was these lines in php.ini file:

 

;  Default Value: E_ALL & ~E_NOTICE

;  Development Value: E_ALL | E_STRICT

;  Production Value: E_ALL & ~E_DEPRECATED

 

I was getting this error when I ran php -v in the terminal:

PHP:  parse error in /private/etc/php.ini on line 111

 

Just commented those out and it works now ... I wonder if I'm just not getting the date.timezone error because I commented out the error reporting stuff

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.