Export the required local time zone value using the ZONE
environment variable.
Skip this step if setting up a system with the default UTC
time zone.
# export ZONE="Europe/London"
# sed -i \
-e "s~^\(ZONE=\).*$~\1${ZONE:-UTC}~" \
/etc/sysconfig/clock \
&& ln -sf \
/usr/share/zoneinfo/${ZONE:-UTC} \
/etc/localtime
# timedatectl set-timezone ${ZONE:-UTC}
If PHP is installed it is necessary to set a valid default time zone.
# sed -r -i \
-e "s~^;?(date.timezone[ ]+=).*$~\1 ${ZONE:-UTC}~" \
/etc/php.ini
Services will need reloading for the time zone changes to be picked up. Either restart the server or the applicable services - for example, if you have a running a MySQL or PHP Apache server you will need to reload the configuration to pick up the changes.