首先查看当前系统时区:
*[root@localhost lampp]# cat /etc/sysconfig/clock
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Asia/Chongqing"*
系统显示当前时区是亚洲重庆时区,如果我们想调整时区为上海
[root@localhost lampp]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cp: overwrite `/etc/localtime'?
然后输入y,或者用
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime -f
重启系统就好了