CentOS 7 and the actual time difference between the system time 8 hours

1, view the system time:

1 [root@localhost sysconfig]# timedatectl
2       Local time: 一 2017-11-06 21:13:19 CST
3   Universal time: 一 2017-11-06 13:13:19 UTC
4         RTC time: 一 2017-11-06 13:13:19
5        Time zone: Asia/Shanghai (CST, +0800)
6      NTP enabled: no
7 NTP synchronized: no
8  RTC in local TZ: no
9       DST active: n/a

Universal time discovery system time and the time difference of 8 hours;

2, when you view the system area:

1 [root@localhost sysconfig]# ls /usr/share/zoneinfo/
2 Africa      Brazil   Egypt    GB-Eire    HST          Japan      Navajo    posixrules  Turkey     zone1970.tab
3 America     Canada   Eire     GMT        Iceland      Kwaj

3, delete the partition in which the current system:

[root@localhost sysconfig]# sudo rm /etc/localtime

4, create a soft link from / usr / share / zoneinfo / to replace the current time zone information, direct selection Universal:

[root@localhost sysconfig]# sudo ln -s /usr/share/zoneinfo/Universal /etc/localtime

5, once again check the system time

1 [root@localhost sysconfig]# sudo timedatectl
2       Local time: 一 2017-11-06 13:14:32 UTC
3   Universal time: 一 2017-11-06 13:14:32 UTC
4         RTC time: 一 2017-11-06 13:14:32
5        Time zone: Universal (UTC, +0000)
6      NTP enabled: no
7 NTP synchronized: no
8  RTC in local TZ: no
9       DST active: n/a

 

Reference: https://blog.csdn.net/lin521lh/article/details/78456654

Guess you like

Origin www.cnblogs.com/116970u/p/11297161.html