PhilippMundhenk / BrotherScannerDocker

Dockerized Brother Scanner driver
https://www.mundhenk.org
MIT License
53 stars 27 forks source link

Wrong Timezone in php #26

Open vgarcia007 opened 3 days ago

vgarcia007 commented 3 days ago

The time zone is displayed as UTC by PHP, even though it is set to Europe/Berlin in the compose file. It might be necessary to write the time zone into the php.ini.

The runScanner.sh script could possibly handle this. It could read the time zone from the environment variable and accordingly write a string into the php.ini.

PhilippMundhenk commented 3 days ago

It seems that TZ is not an env that is available to www-data, the user running lighttpd and thus php. Writing TZ on boot to php.ini seems to make sense. There is also some adaptions of the lighttpd config with sed. A similar approach could be used for php, possibly more difficult, if accounting for different php versions (/etc/php/8.1/php.ini)