How can I change the php timezone in php.ini


I’m getting an error when trying to run codeception tests that states:

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.

I’ve tried echo “date.timezone = America/New_York” > /opt/circleci/php/$(phpenv global)/etc/conf.d/date.ini in dependencies: override: but doing so causes drush and codeception to not install correctly.

Any advice would be appreciated.


After further inspection, it looks like the composer install isn’t run when I try and set the timezone.


Same problem here, but this worked for me:

echo "date.timezone = Europe/Berlin" >> /opt/circleci/php/$(phpenv global)/etc/php.ini