Turgon37 / docker-glpi

Docker image running GLPI
MIT License
28 stars 18 forks source link

Timezone in the glpi container #21

Closed Wolvverine closed 5 years ago

Wolvverine commented 6 years ago

The container is currently set permanently UTC timezone, which generates problems, for example: with Fusioninventory, tasks and agents. The settings in php.ini are skipped, GLPI still shows the UTC time. It should be possible to configure this at the stage of the container installation. For example, with the default settings from the host. workaround:

docker exec -it glpi /bin/sh -c "apk add --no-cache tzdata"
docker exec -it glpi /bin/sh -c "export TZ='Europe/Warsaw'"
docker exec -it glpi /bin/sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone"
Turgon37 commented 5 years ago

Hello, I've implemented this feature. You have just to set TZ environment variable in container and the timezone will be configured. Thanks for this issue

ansgar-forestier commented 5 years ago

I have a correct timezone inside container with a help of TZ env variable, but timezone inside glpi is still is UTC: log records time, time of task creation in UTC.

Set appropriate setting in php.ini solves problem, but may be it's not needed.

The settings in php.ini are skipped, GLPI still shows the UTC time.

What is this mean? How can I skip php.ini settings to achieve correct timezone inside glpi?

Turgon37 commented 5 years ago

Hello @alateas I've just to push #33 to include the timezone configuration for php. According to my test it's works :) can you check on your side with the last nginx-56-9.4.3-latest version ?