我在基于symfony2的应用程序中遇到了奇怪的错误。在每个使用表单的页面上我都会
E_WARNING: DateTimeZone::__construct(): Unknown or bad timezone (1024)
仅供参考,我正在调用
date_default_timezone_set("Europe/Warsaw");
在AppKernel :: init()中。知道怎么摆脱这个警告吗?提前谢谢。
这是来自NewRelic的堆栈跟踪
…or/symfony/symfony/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php (542)
…or/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php (274)
…or/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php (88)
…/shared/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php (167)
…/shared/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php (164)
…/shared/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php (126)
…zy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php (87)
…zy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php (114)
…zy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php (342)
…zy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php (230)
…zy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/in Symfony\Component\Form\FormBuilder::getForm called at /var/www/tumamoczy.pl/shared/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php FormFactory.php (47)
…endor/friendsofsymfony/user-bundle/FOS/UserBundle/Form/Factory/FormFactory.php (33)
…endsofsymfony/user-bundle/FOS/UserBundle/Controller/RegistrationController.php (48)
in FOS\UserBundle\Controller\RegistrationController::registerAction called at ? (?)
…alled at /var/www/tumamoczy.pl/releases/20130602213844/app/bootstrap.php.cache (1003)
…alled at /var/www/tumamoczy.pl/releases/20130602213844/app/bootstrap.php.cache (977)
…alled at /var/www/tumamoczy.pl/releases/20130602213844/app/bootstrap.php.cache (1103)
…alled at /var/www/tumamoczy.pl/releases/20130602213844/app/bootstrap.php.cache (413)
…el::handle called at /var/www/tumamoczy.pl/releases/20130602213844/web/app.php (21)
看起来警告出现在StubIntlDateFormatter.php中,对吗?这是一个Symfony2问题吗?它甚至可以解决吗?