首先查看当前系统时区:
*[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
重启系统就好了
本文介绍如何在Linux系统中更改时区设置。通过复制指定时区文件到/etc/localtime路径来实现时区调整,例如从亚洲重庆时区改为上海时区,并提供了具体的命令示例。
618

被折叠的 条评论
为什么被折叠?



