macos – 时区与symfony 2

前端之家收集整理的这篇文章主要介绍了macos – 时区与symfony 2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我遇到了Symfony 2的一些麻烦,试图通过以下方式生成模式:
  1. PHP console/app generate:schema:create

我有一个很漂亮的错误

  1. [Exception]
  2. DateTime::__construct(): It is not safe to rely on the system's
  3. timezone settings. You are *required* to use the date.timezone
  4. setting or the date_default_timezone_set() function.
  5.  
  6. In case you used any of those methods and you are still
  7. getting this warning,you most likely misspelled the timezone
  8. identifier.
  9.  
  10. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead

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

  1. date.timezone = 'Europe/Paris'

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

  1. date.timezone Europe/Zurich Europe/Zurich

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

谢谢你的帮助

在Mac上,如果您有/etc/PHP.ini.default,请执行
  1. sudo cp /etc/PHP.ini.default /etc/PHP.ini

然后呢

  1. PHP --ini

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

猜你在找的PHP相关文章