Saperlipopette Saperlipopette - 1 year ago 155
PHP Question

Timezone with symfony 2

I've got some troubles whith Symfony 2, trying to generate schema via :

php console/app generate:schema:create

I've got a pretty error :

DateTime::__construct(): 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

We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead

Thus, I'm trying to change the timezone in my php.ini with

date.timezone = 'Europe/Paris'

but even if I'm reloading my apache, I still get

date.timezone Europe/Zurich Europe/Zurich

if I look at my
, so I don't really know what should I try next ... And I'm not even sure that I'm in the good way.

Thanks for helping me

Answer Source

On mac, if you have /etc/php.ini.default, do

sudo cp /etc/php.ini.default /etc/php.ini 

and then do

php --ini 

to see that it now loads a php.ini file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download