Skip to content

Commit 7c90557

Browse files
committed
Fix timezone overwriting php-local.ini contents
1 parent fdf4c99 commit 7c90557

File tree

1 file changed

+2
-3
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-php

1 file changed

+2
-3
lines changed

root/etc/s6-overlay/s6-rc.d/init-php/run

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ fi
99
# create local php.ini if it doesn't exist, set local timezone
1010
if [[ ! -f /config/php/php-local.ini ]]; then
1111
printf "; Edit this file to override php.ini directives\\n\\n" >/config/php/php-local.ini
12+
# set default timezone
13+
printf "date.timezone = %s\\n" "${TZ:-UTC}" >/config/php/php-local.ini
1214
fi
1315

14-
# set default timezone
15-
printf "date.timezone = %s\\n" "${TZ:-UTC}" >/config/php/php-local.ini
16-
1716
# create override for www.conf if it doesn't exist
1817
if [[ ! -f /config/php/www2.conf ]]; then
1918
printf "; Edit this file to override www.conf and php-fpm.conf directives and restart the container\\n\\n; Pool name\\n[www]\\n\\n" >/config/php/www2.conf

0 commit comments

Comments
 (0)