macos – 时区与symfony 2
发布时间:2020-12-13 13:47:09 所属栏目:PHP教程 来源:网络整理
导读:我遇到了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 t
我遇到了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' 但即使我正在重装我的阿帕奇,我仍然会得到 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文件. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |