From 0445c3cdee226d88f5a57e921872344fc9770a31 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 22 Aug 2016 12:56:04 +0300 Subject: [PATCH] roles/php-fpm: Set timezone in php.ini template Since we're using a variable for the timezone for systemd-timesyncd anyways, we can also use it for PHP's config. --- roles/php-fpm/templates/php.ini.j2 | 4 +++- roles/php-fpm/templates/php7.0-php.ini.j2 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/php-fpm/templates/php.ini.j2 b/roles/php-fpm/templates/php.ini.j2 index 5496a15..63b787c 100644 --- a/roles/php-fpm/templates/php.ini.j2 +++ b/roles/php-fpm/templates/php.ini.j2 @@ -880,7 +880,9 @@ cli_server.color = On [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone -;date.timezone = +{% if timezone is defined %} +date.timezone = {{ timezone }} +{% endif %} ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667 diff --git a/roles/php-fpm/templates/php7.0-php.ini.j2 b/roles/php-fpm/templates/php7.0-php.ini.j2 index bd8e309..e713558 100644 --- a/roles/php-fpm/templates/php7.0-php.ini.j2 +++ b/roles/php-fpm/templates/php7.0-php.ini.j2 @@ -909,7 +909,9 @@ cli_server.color = On [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone -;date.timezone = +{% if timezone is defined %} +date.timezone = {{ timezone }} +{% endif %} ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667