タイムゾーンと時間の設定
1110 ワード
現在の時刻とタイムゾーンの表示
中国所在時区に設置
使用NTP校正時間
# ,
$ timedatectl
Local time: 2019-12-26 05:52:36 EST
Universal time: 2019-12-26 10:52:36 UTC
RTC time: 2019-12-26 10:52:36
Time zone: America/New_York (EST, -0500)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
2019-11-03 01:59:59 EDT
2019-11-03 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
2020-03-08 01:59:59 EST
2020-03-08 03:00:00 EDT
中国所在時区に設置
#
$ timedatectl list-timezones
#
$ timedatectl set-timezone Asia/Shanghai
使用NTP校正時間
$ ntpdate -u time1.aliyun.com
# , ,
$ timedatectl
Local time: 2019-12-26 18:57:33 CST
Universal time: 2019-12-26 10:57:33 UTC
RTC time: 2019-12-26 10:57:33
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a