修改中国时区问题处理

it2022-05-05  136

修改中国时区问题处理

系统信息(centos 、rancherOs)

Linux iZwz94wxzv9g5i3u46xwr4Z 3.10.0-514.21.2.el7.x86_64 #1 SMP Tue Jun 20 12:24:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Linux rancher 4.14.32-rancher2 #1 SMP Fri May 11 11:30:31 UTC 2018 x86_64 GNU/Linux

查看当前时间

datedate -R (包含时区)date

linux系统中,系统创建时候如果没有在安装的时候选择时区,会默认时区 +0000,

date -R

参照修改还不能修改全局时间只能修改用户时间,

编辑文件 vi /etc/profile 尾部添加 export TZ='CST-8' 生效 source /etc/profile

阿里云ecs时间同步(备忘)

ntpdate cn.pool.ntp.org

修改时区原文

修改环境变量原文


最新回复(0)