问题描述:
今天在使用centos7 安装docker测试目录挂载时,发现时间和本地时间不对,相差8小时,于是我把时间改回来了🤣🤣
查看centos7系统时间
[root@bogon local]# timedatectl
Local time: 三 2020-08-19 11:22:47 CST
Universal time: 三 2020-08-19 03:22:47 UTC
RTC time: 三 2020-08-19 11:22:48
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: yes
DST active: n/a
删除当前系统所处的分区
[root@bogon local]# sudo rm /etc/localtime
创建软连接以替换当前的时区信息
[root@bogon local]# sudo ln -s /usr/share/zoneinfo/Universal /etc/localtime
再次查看系统时间
[root@bogon local]# timedatectl
Local time: 三 2020-08-19 03:26:41 UTC
Universal time: 三 2020-08-19 03:26:41 UTC
RTC time: 三 2020-08-19 03:26:41
Time zone: Universal (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a