jchlu
4/5/2015 - 9:08 AM

php7dev change timezone with sed

php7dev change timezone with sed

php7dev comes pre-configured as being on UTC - these commands visually check that and set all instances to the correct timezone for the UK:

find /etc/ -iname php.ini -exec cat '{}' \; | grep "date\.timezone"
find . -iname php.ini -exec sed -i "s/date\.timezone = \"UTC\"/date.timezone = \"Europe\/London\"/g" '{}' \;
find /etc/ -iname php.ini -exec cat '{}' \; | grep "date\.timezone"

Then, probably, sudo service nginx restart && sudo service php-fpm restart