From 2352b16f43b6161cf6c6323b3d18ad0acf626834 Mon Sep 17 00:00:00 2001 From: Janis Bebritis Date: Thu, 11 Jan 2024 11:16:25 +0200 Subject: [PATCH 1/4] Test TZ change via /etc/localtime --- silta/php.Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/silta/php.Dockerfile b/silta/php.Dockerfile index 21ea09e00..bbf13b8fb 100644 --- a/silta/php.Dockerfile +++ b/silta/php.Dockerfile @@ -5,4 +5,8 @@ FROM wunderio/silta-php-fpm:8.0-fpm-v1 COPY --chown=www-data:www-data . /app +# Set timezone. +ENV TZ=Europe/Riga +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + USER www-data From 773576b4b831db5d228ecf78f11328894e1a31d5 Mon Sep 17 00:00:00 2001 From: Janis Bebritis Date: Thu, 11 Jan 2024 12:34:31 +0200 Subject: [PATCH 2/4] add tzdata package --- silta/php.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/silta/php.Dockerfile b/silta/php.Dockerfile index bbf13b8fb..68852c5f0 100644 --- a/silta/php.Dockerfile +++ b/silta/php.Dockerfile @@ -6,6 +6,7 @@ FROM wunderio/silta-php-fpm:8.0-fpm-v1 COPY --chown=www-data:www-data . /app # Set timezone. +RUN apk add tzdata ENV TZ=Europe/Riga RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone From 274ffa6eb317972ac7965995c0faf2ab5cb89695 Mon Sep 17 00:00:00 2001 From: Janis Bebritis Date: Thu, 11 Jan 2024 12:40:17 +0200 Subject: [PATCH 3/4] TZ env + tzdata package --- silta/shell.Dockerfile | 2 ++ silta/silta.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/silta/shell.Dockerfile b/silta/shell.Dockerfile index 5633361ff..61a5d77bf 100644 --- a/silta/shell.Dockerfile +++ b/silta/shell.Dockerfile @@ -3,4 +3,6 @@ #FROM wunderio/silta-php-shell:php7.4-v1 FROM wunderio/silta-php-shell:php8.0-v1 +RUN apk add tzdata + COPY --chown=www-data:www-data . /app diff --git a/silta/silta.yml b/silta/silta.yml index 80f4c260b..890302bf2 100644 --- a/silta/silta.yml +++ b/silta/silta.yml @@ -54,3 +54,7 @@ php: # In feature environments, run cron jobs very seldom. Adjust as needed. # ~ gets replaced with a random digit between 0 and 9 to prevent having all cron jobs at once. schedule: '~ 0 1 2 *' + + env: + TZ: Europe/Riga + From 1919ed880af21f57ba3cb3ccfafe8bd5ece73f84 Mon Sep 17 00:00:00 2001 From: Janis Bebritis Date: Thu, 11 Jan 2024 12:49:48 +0200 Subject: [PATCH 4/4] Cleanup --- silta/php.Dockerfile | 5 ----- silta/shell.Dockerfile | 2 -- silta/silta.yml | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/silta/php.Dockerfile b/silta/php.Dockerfile index 68852c5f0..21ea09e00 100644 --- a/silta/php.Dockerfile +++ b/silta/php.Dockerfile @@ -5,9 +5,4 @@ FROM wunderio/silta-php-fpm:8.0-fpm-v1 COPY --chown=www-data:www-data . /app -# Set timezone. -RUN apk add tzdata -ENV TZ=Europe/Riga -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - USER www-data diff --git a/silta/shell.Dockerfile b/silta/shell.Dockerfile index 61a5d77bf..5633361ff 100644 --- a/silta/shell.Dockerfile +++ b/silta/shell.Dockerfile @@ -3,6 +3,4 @@ #FROM wunderio/silta-php-shell:php7.4-v1 FROM wunderio/silta-php-shell:php8.0-v1 -RUN apk add tzdata - COPY --chown=www-data:www-data . /app diff --git a/silta/silta.yml b/silta/silta.yml index 890302bf2..f98cc70df 100644 --- a/silta/silta.yml +++ b/silta/silta.yml @@ -56,5 +56,5 @@ php: schedule: '~ 0 1 2 *' env: - TZ: Europe/Riga + TZ: Europe/Helsinki