有人知道怎么会发生这种事吗?我的服务器比每个google的实时时间慢7分钟(这与用户设备/手机上显示的实时时间相匹配)。
我正在使用Ubuntu服务器在数字海洋上。

ruby (在irc中):
Time.zone.now => Fri 2018年7月27日09:19:12 CDT -05:00shell (在irc中):
date =>“星期五7月27日14:19:17 UTC 2018\n”我怎么能休息七分钟?这台服务器运行4+已经好几年了。我认为这是最近发生的,它导致服务器和终端设备之间的同步问题。
编辑:@9:39 per / Google
我刚刚发现了timedatectl的事。似乎我的服务器时间没有同步:
$ timedatectl
Local time: Fri 2018-07-27 14:32:30 UTC
Universal time: Fri 2018-07-27 14:32:30 UTC
Timezone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a编辑:@ 9:47AM CDT / Google
我刚安装了NTP
$ sudo apt-get update
$ sudo apt-get install ntptimedatectl仍然显示休息7分钟,但表示NTP同步:是的
$ timedatectl
Local time: Fri 2018-07-27 14:39:38 UTC
Universal time: Fri 2018-07-27 14:39:38 UTC
Timezone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a编辑:@9:50 per / Google
timedatectl现在看起来是正确的,但表示NTP同步:否:
$ timedatectl
Local time: Fri 2018-07-27 14:50:12 UTC
Universal time: Fri 2018-07-27 14:50:12 UTC
Timezone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/ahttps://stackoverflow.com/questions/51560179
复制相似问题