我正在尝试使用控制台添加一个包含以下代码的新包...
php app/console generate:bundle
它如何给我以下错误......
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: date_default_timezone_get(): 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 me
thods and you are still getting this warning, you most likely misspelled th
e timezone identifier. We selected the timezone 'UTC' for now, but please s
et date.timezone to select your timezone. in /Users/Phil/Sites/SoccerTips24
/vendor/monolog/monolog/src/Monolog/Logger.php line 233
generate:bundle [--namespace="..."] [--dir="..."] [--bundle-name="..."] [--format="..."] [--structure]
我理解第一个是与时间设置有关但随后捆绑不会添加到我的src文件夹... 任何想法如何解决?
答案 0 :(得分:2)
在php.ini中设置时区
php -i |grep php.ini
取消注释时区记录,并设置时区:
date.timezone = "Europe/Paris"
答案 1 :(得分:1)
一旦你去你的php.ini并设置你的时区它应该工作。