Skip to content

Commit 4617167

Browse files
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:~# ```
1 parent e49338a commit 4617167

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

install/php-configs/php.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ cli_server.color = On
887887
; Defines the default timezone used by the date functions
888888
; http://php.net/date.timezone
889889
;date.timezone =
890+
date.timezone = UTC
890891

891892
; http://php.net/date.default-latitude
892893
;date.default_latitude = 31.7667

0 commit comments

Comments
 (0)