date 命令查看时区
tzselect 选择时区
如果选择失败,则采用以下过程:
[root@linuxkit-00155d65ef0b nginx-1.12.2]# TZ='Asia/Shanghai'; export TZ
[root@linuxkit-00155d65ef0b nginx-1.12.2]# date
Thu Jul 25 15:25:50 CST 2019
[root@linuxkit-00155d65ef0b nginx-1.12.2]# rm /etc/localtime
rm: remove symbolic link '/etc/localtime'? y
[root@linuxkit-00155d65ef0b nginx-1.12.2]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
设置临时时区:TZ=‘Asia/Shanghai’; export TZ
永久设置:ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime