时区与symfony 2

Sap*_*tte 8 php macos timezone symfony

我遇到了Symfony 2的一些麻烦,试图通过以下方式生成模式:

php console/app generate:schema:create
Run Code Online (Sandbox Code Playgroud)

我有一个很好的错误:

[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
Run Code Online (Sandbox Code Playgroud)

因此,我正在尝试用我的php.ini更改时区

date.timezone = 'Europe/Paris'
Run Code Online (Sandbox Code Playgroud)

但即使我正在重装我的阿帕奇,我仍然会得到

date.timezone   Europe/Zurich   Europe/Zurich
Run Code Online (Sandbox Code Playgroud)

如果我看着我phpinfo(),所以我真的不知道接下来应该尝试什么......而且我甚至不确定我是不是很好.

谢谢你的帮助

小智 17

在Mac上,如果你有/etc/php.ini.default,做

sudo cp /etc/php.ini.default /etc/php.ini 
Run Code Online (Sandbox Code Playgroud)

然后呢

php --ini 
Run Code Online (Sandbox Code Playgroud)

看到它现在加载一个php.ini文件.