Setting the timezone ini value doesn't seem to be functional #901
-
I've got a simple Laravel project that locally uses Docker with a supplied ini file in the docker-compose.yml file. example-php-service:
volumes:
- ./docker/custom.ini:/usr/local/etc/php/conf.d/zzz-last-loaded.ini This ini contains a timezone setter Now i wanted to repeat this on my test runner by using this config.
Which loads it in as shown by the GitHub log
But then when pulling the timezone from a timestamp in a PHPUnit step, it is still set as What would be the cause? For now i can fix it in the code by doing this, but it is weird that my ini value isn't respected. protected function setUp(): void
{
parent::setUp();
date_default_timezone_set('Europe/Amsterdam');
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Fixed it by just forcing Laravel in |
Beta Was this translation helpful? Give feedback.
Fixed it by just forcing Laravel in
app.php
to uphold a timezone, seems to just be a difference in Docker PHP handling the ini compared to setup-php and Laravel. The ini was set but Laravel would change it, except the Docker set up somehow made Laravel not change it.