1. [root@yum-server-it-ap01 ~]# chronyc sourcestats -v
    2. 210 Number of sources = 1
    3. .- Number of sample points in measurement set.
    4. / .- Number of residual runs with same sign.
    5. | / .- Length of measurement set (time).
    6. | | / .- Est. clock freq error (ppm).
    7. | | | / .- Est. error in freq.
    8. | | | | / .- Est. offset.
    9. | | | | | | On the -.
    10. | | | | | | samples. \
    11. | | | | | | |
    12. Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev
    13. ==============================================================================
    14. 10.82.100.81 5 3 71 +0.003 10.482 +109ns 27us
    15. [root@yum-server-it-ap01 ~]# chronyc sources -v
    16. 210 Number of sources = 1
    17. .-- Source mode '^' = server, '=' = peer, '#' = local clock.
    18. / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
    19. | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
    20. || .- xxxx [ yyyy ] +/- zzzz
    21. || Reachability register (octal) -. | xxxx = adjusted offset,
    22. || Log2(Polling interval) --. | | yyyy = measured offset,
    23. || \ | | zzzz = estimated error.
    24. || | | \
    25. MS Name/IP address Stratum Poll Reach LastRx Last sample
    26. ===============================================================================
    27. ^* 10.82.100.81 11 6 77 5 +23us[ +116us] +/- 292ms
    28. [root@yum-server-it-ap01 ~]#
    1. timedatectl set-local-rtc 1
    2. timedatectl set-timezone Asia/Shanghai
    3. systemctl restart chronyd.service
    4. chronyc tracking
    5. chronyc -a makestep
    6. timedatectl

    Local 本地时间
    RTC 硬件时间
    Timezone 时区

    2.设置时区
    timedatectl set-timezone Asia/Shanghai
    或者
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    cp命令覆盖/etc/localtime时间无法解决

    3.是否NTP服务器同步
    timedatectl set-ntp yes //yes或者no

    4.将硬件时钟调整为与本地时钟一致
    timedatectl set-local-rtc 1

    硬件时钟默认使用UTC时间,因为硬件时钟不能保存时区和夏令时调整,修改后就无法从硬件时钟中读取出准确标准时间,因此不建议修改。修改后系统会出现下面的警告。

    Warning: The RTC is configured to maintain time in the local timezone. This
    mode is not fully supported and will create various problems with time
    zone changes and daylight saving adjustments. If at all possible use
    RTC in UTC, by calling ‘timedatectl set-local-rtc 0’。