akrabat / slim3-skeleton

Simple Slim Framework 3 skeleton with Twig & Monolog
BSD 3-Clause "New" or "Revised" License
345 stars 99 forks source link

Lacking default timezone for PHP5.5 #17

Closed flavioheleno closed 8 years ago

flavioheleno commented 8 years ago

Running this skeleton on a PHP5.5 install, user will see an error related to the lack of default timezone (used by the log).

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 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. in my-app/vendor/monolog/monolog/src/Monolog/Logger.php on line 272

This can be easily fixed by adding a date_default_timezone_set('Etc/UTC'); to index.php.

akrabat commented 8 years ago

As per the error message you have quoted, you should set the date.timezone setting in your php.in file.