问题:

当前时间为北京时间2021-01-24 14:36:15,但是在服务器上的时间却慢了12个小时,关于在于系统时区设置为EDT,比北京时间慢了12个钟头

[root@cqs_test ~]# date
Mon Jan 25 10:06:00 CST 2021

解决:

备份系统时间包

[root@cqs_test ~]# cd /etc
[root@cqs_test etc]# mv localtime localtime.bak

创建软连接把上海时间包连过去系统时间包

[root@cqs_test etc]# ln -s /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

查看当前时间

[root@cqs_test etc]# date
Mon Jan 25 10:06:00 CST 2021

如果这时候时间还不对的话,可以执行以下命令进行同步

[root@cqs etc]# ntpdate us.pool.ntp.org

安装该命令的命令

yum install -y ntpdate

 

GitHub 加速计划 / li / linux-dash
11
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐