DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
31 stars 37 forks source link

Time zone issues in DOMserver docker image #100

Closed Dup4 closed 2 years ago

Dup4 commented 2 years ago

In the README, pointed out that is can be passed CONTAINER_TIMEZONE to set system time zone.

https://github.com/DOMjudge/domjudge-packaging/blob/95ffd1053678454e89635bad42eb3530b9f71a46/docker/README.md#L77

During container startup, this did change the time zone of the system.

https://github.com/DOMjudge/domjudge-packaging/blob/95ffd1053678454e89635bad42eb3530b9f71a46/docker/domserver/scripts/start.d/10-timezone.sh#L3-L6

But during the image building process, the default time zone setting of php is changed through CONTAINER_TIMEZONE.

https://github.com/DOMjudge/domjudge-packaging/blob/95ffd1053678454e89635bad42eb3530b9f71a46/docker/domserver/configure.sh#L37-L42

So if we pass in CONTAINER_TIMEZONE when the container is started, it will not change the default time zone of php, which will cause the relevant time zone in the DOMserver to not meet expectations.

So I suggest adding a replacement for the time zone in php.ini in docker/domserver/scripts/start.d/10-timezone.sh

If this proposal is passed, I can make corresponding changes.

nickygerritsen commented 2 years ago

Sounds good. PR indeed welcome