每次开机到拱门时,我都会发现时间已经过了几分钟。RTC的时间已经过去了(据我所知,它已经“漂移”了)。影响硬件时钟。
$ timedatectl status
Local time: Mo 2018-02-12 12:45:18 CET
Universal time: Mo 2018-02-12 11:45:18 UTC
RTC time: Mo 2018-02-12 11:45:18
Time zone: Europe/Berlin (CET, +0100)
System clock synchronized: no
systemd-timesyncd.service active: no
RTC in local TZ: no编辑写这篇文章时,我没有意识到这一行上方的时间值与另一行是一致的。然而,他们抵消了我的手表和智能手机的时间,也就是前面提到的7分钟。
我所在的地方:
$ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=到目前为止,我非常不愿意使用hwclock --hctosys,因为手册页声明:
此函数不应在运行中的系统上使用。跳转系统时间会导致问题,例如损坏的文件系统时间戳。另外,如果有什么东西改变了硬件时钟,比如NTP的'11分钟模式‘,那么-hctosys就会错误地通过包括漂移补偿来设置时间。
据我所知,我正确配置了Windows 10。有什么东西我遗漏了吗?还是我没有正确地设置时钟?
EDIT 2应请求,/etc/ntp.conf的内容:
# Please consider joining the pool:
#
# http://www.pool.ntp.org/join.html
#
# For additional information see:
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - the ntp.conf man page
# Associate to Arch's NTP pool
server 0.arch.pool.ntp.org
server 1.arch.pool.ntp.org
server 2.arch.pool.ntp.org
server 3.arch.pool.ntp.org
# By default, the server allows:
# - all queries from the local host
# - only time queries from remote hosts, protected by rate limiting and kod
restrict default kod limited nomodify nopeer noquery notrap
restrict 127.0.0.1
restrict ::1
# Location of drift file
driftfile /var/lib/ntp/ntp.drift发布于 2018-02-12 12:17:36
如果在启动时,实时和RTC之间的时间差较大,则可以配置NTP,使其在启动后一次过补偿,而不是随着时间的推移缓慢和递增地进行。
我将添加到您的/etc/ntp.conf文件中作为第一行(它必须是第一行):
tinker panic 0修补程序恐慌--以秒为单位指定默认1000 s的恐慌阈值。如果设置为零,则将禁用恐慌状态检查,并接受任意值的时钟偏移量。
虽然这可能解决目前的Linux时间问题,但随着时间的推移,我还将研究两个开放源码软件之间时间漂移的根本原因。
https://unix.stackexchange.com/questions/423577
复制相似问题