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 :
[Exception]
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
identifier.
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 phpinfo()
, 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
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.
this that trick
and se /etc/php5/cli/php.ini
and /etc/php5/apache2/php.ini
datetime = 'America/Lima'
for example
and run command
$ sudo apt-get install php5-sqlite
$ sudo /etc/init.d/apache2 restart
Some third-party distributions of PHP (including MAMP) have hard-coded the timezone. For instance, MAMP 2.0 is hard-coded to Europe/Berlin, and there is no way to change this. Even changing the value in the php.ini template has no effect, because MAMP overwrites your value. Are you using PHP from source, a pre-compiled package, or PHP as a part of some kind of LAMP stack?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With