当前位置: 动力学知识库 > 问答 > 编程问答 >

symfony2 - Symfony 2 When running Generate:Bundle it does not work

问题描述:

I am trying to add a new bundle using the console with the follow code...

php app/console generate:bundle

How ever it is giving me the following error...

[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]

I understand the first one is something to do with the time settings but then bundles wont add to my src folder...

Any ideas how to fix?

网友答案:

Set timezone in your php.ini

 php -i |grep php.ini

uncomment timezone record, and set you timezone:

date.timezone = "Europe/Paris"
网友答案:

Once you go to your php.ini and set your timezone it should work.

分享给朋友:
您可能感兴趣的文章:
随机阅读: