CentOS 7システム時間と実時間の差8時間
1255 ワード
1、システム時間を表示する:
2、システムタイムゾーンを表示する:
[root@localhost sysconfig]# timedatectl
Local time: 2017-11-06 21:13:19 CST
Universal time: 2017-11-06 13:13:19 UTC
RTC time: 2017-11-06 13:13:19
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
システム時間とUniversal time時間の差が8時間あることが分かった.2、システムタイムゾーンを表示する:
[root@localhost sysconfig]# ls /usr/share/zoneinfo/
Africa Brazil Egypt GB-Eire HST Japan Navajo posixrules Turkey zone1970.tab
America Canada Eire GMT Iceland Kwaj
3、現在のシステムが置かれているパーティションを削除する:[root@localhost sysconfig]# sudo rm /etc/localtime
4、/usr/share/zoneinfo/からソフト接続を作成し、現在のタイムゾーン情報を置き換え、Universalを直接選択します.[root@localhost sysconfig]# sudo ln -s /usr/share/zoneinfo/Universal /etc/localtime
5、システム時間の再確認[root@localhost sysconfig]# sudo timedatectl
Local time: 2017-11-06 13:14:32 UTC
Universal time: 2017-11-06 13:14:32 UTC
RTC time: 2017-11-06 13:14:32
Time zone: Universal (UTC, +0000)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a