gpt4 book ai didi

macos - symfony 2 的时区

转载 作者:可可西里 更新时间:2023-11-01 12:26:44 25 4
gpt4 key购买 nike

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

php console/app generate:schema:create

我有一个错误:

[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

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

date.timezone = 'Europe/Paris'

但即使我重新加载我的apache,我仍然得到

date.timezone   Europe/Zurich   Europe/Zurich

如果我查看我的 phpinfo(),那么我真的不知道接下来应该尝试什么……而且我什至不确定我的方法是否正确。

谢谢你帮助我

最佳答案

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

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

然后做

php --ini 

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

关于macos - symfony 2 的时区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6194003/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com