CentOS 7修改方式如下: # lsb_release -a  --查看系统版本-CentOS Linux release 7.6 # timedatectl     --查看当前系统时区
# ls -l /etc/localtime
# timedatectl list-timezones | grep 'Dubai' 或者grep 'Shanghai'查看国内时期。这里我要修改为Dubai时间。
Asia/Dubai
# timedatectl set-timezone Asia/Dubai
# ll /etc/localtime
lrwxrwxrwx 1 root root 32 Apr 21 18:58 /etc/localtime -> ../usr/share/zoneinfo/Asia/Dubai   You need to use the ln command to set timezone on Centos 6. Type the following commands as root: cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
Verify new settings by typing the following two commands:
date
ls -l /etc/localtime
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄