From 4617167ac858d79cd8ecec1ccb736490055cbfb0 Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Tue, 21 Jul 2020 09:20:55 -0400 Subject: [PATCH] Update php.ini Set a default value for "date.timezone" to "UTC" as I noticed its unset by default and breaks logs and some CMS which needs this to log accurate times unless people setup a custom local value or manually set it. This should ensure that this is always set to something to prevent the below. ``` root@server:~# for phpver in $(ls -1 /usr/local/lsws/ |grep lsphp | sed 's/lsphp//g') ; do echo ""; echo "LSPHP $phpver" ; /usr/local/lsws/lsphp$phpver/bin/php -i |grep -Ei 'date.timezone' && echo "" ; done LSPHP 70 date.timezone => no value => no value LSPHP 71 date.timezone => no value => no value LSPHP 72 date.timezone => no value => no value LSPHP 73 date.timezone => no value => no value LSPHP 74 date.timezone => no value => no value root@server:~# ``` --- install/php-configs/php.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/install/php-configs/php.ini b/install/php-configs/php.ini index 42e85a5a5..99712a192 100755 --- a/install/php-configs/php.ini +++ b/install/php-configs/php.ini @@ -887,6 +887,7 @@ cli_server.color = On ; Defines the default timezone used by the date functions ; http://php.net/date.timezone ;date.timezone = +date.timezone = UTC ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667