Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime::__construct(): It is not safe to rely on the system's timezone settings. #9

Closed
kershnerd opened this issue Dec 31, 2014 · 2 comments

Comments

@kershnerd
Copy link

@weierophinney: Any idea why I am getting this exception?

Compiling and sorting entries======================================================================

The application has thrown an exception!

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 the timezone 'UTC' for now, but please set date.timezone to select your timezone.

/Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/phly/phly-common/src/PhlyCommon/Filter/Timestamp.php:23
#0 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/phly/phly-common/src/PhlyCommon/Filter/Timestamp.php(23): DateTime->__construct()
#1 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/phly/phly-blog/src/PhlyBlog/EntryEntity.php(234): PhlyCommon\Filter\Timestamp->filter(1300744335)
#2 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/data/blog/sample-post.php(19): PhlyBlog\EntryEntity->setCreated(1300744335)
#3 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/phly/phly-blog/src/PhlyBlog/Compiler.php(60): include('/Users/jkershne...')
#4 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/phly/phly-blog/src/PhlyBlog/CompileController.php(233): PhlyBlog\Compiler->compile()
#5 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82): PhlyBlog\CompileController->compileAction()
#6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request), Object(Zend\Console\Response))
#11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /Users/jkershner/Documents/Projects/Personal/goferhost.dev/public_html/index.php(26): Zend\Mvc\Application->run()
#16 {main}

Previous Exception(s):

@bate
Copy link

bate commented Dec 31, 2014

This exception tells you that you have to setup your php correctly.

See http://php.net/manual/en/datetime.configuration.php
This has to be done by your zf2 configuration.

@kershnerd
Copy link
Author

Oh crap.. I ran the blog compile on my MAC and not on the Vagrant box that the dev site is deployed to. Rookie mistake. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants