-2

The PHP standard error

Warning: date_default_timezone_get(): 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

is at it again. After upgrading my OS X 10.6 to 10.9 I now all of a sudden get it again. I've looked into php.ini and lo and behold, the update trashes it. So I set it to:

date.timezone = "Europe/Berlin"

And... nothing. Error still there. This is /etc/php.ini or /private/etc/php.ini - they're links anyways.

Now I'm trying to do this with the Symfony2 app/console, which may or may not have something to do with it.

So how do I get this blocking error to go away if not in php.ini ? If I run phpinfo() from the commandline, it quite happily tells me that my timezone is exactly what I told it. Still get this error.

Lundin
  • 195,001
  • 40
  • 254
  • 396
Tom
  • 2,688
  • 3
  • 29
  • 53
  • Try this [answer](http://stackoverflow.com/questions/12543236/date-default-timezone-get-it-is-not-safe-to-rely-on-the-systems-timezone-set) – WebHQ Mar 02 '14 at 11:17
  • Edited to removed flaming. Post in a civilized language or don't post at all. Stack Overflow is not to blame for PHP errors. – Lundin Apr 17 '14 at 11:09

1 Answers1

0

It turned out that Symfony2 uses /usr/bin/env to set a different environment, where the php.ini is expected in /usr/local/etc/ . doh.

Tom
  • 2,688
  • 3
  • 29
  • 53