我的Ubuntu 16.04.5 PC位于Delhi, India。
我正在尝试将我的系统时钟与美国NTP服务器同步。在我的系统的/etc/ntp.conf文件中,我使用了以下配置:
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
# pool 0.ubuntu.pool.ntp.org iburst
# pool 1.ubuntu.pool.ntp.org iburst
# pool 2.ubuntu.pool.ntp.org iburst
# pool 3.ubuntu.pool.ntp.org iburst
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
# Use Ubuntu's ntp server as a fallback.
# pool ntp.ubuntu.comntpq -p的输出是:
remote refid st t when poll reach delay offset jitter
==============================================================================
*hydrogen.consta 209.51.161.238 2 u 46 64 377 223.270 -93.650 47.200
+horp-bsd01.horp 152.2.133.54 2 u 47 64 377 271.806 -103.56 35.670
ntpool1.603.new .XFAC. 16 u 1463 512 0 0.000 0.000 0.000
+69.10.161.7 195.205.216.85 3 u 30 64 377 268.569 -95.798 54.450但我的系统仍在印度标准时间(IST)。我做错了什么?
发布于 2019-05-17 07:37:27
NTP总是在UTC分配时间。它在哪里并不重要。
时区在您的计算机上应用,不同的用户可以有不同的时区。在内部,Unix会跟踪UTC的时间。
若要更改时区,请运行sudo dpkg-reconfigure tzdata。
还可以更改单个命令的时区:
[~]$ TZ=UTC; date
Fri 17 May 07:34:05 UTC 2019
[~]$ TZ=CEST; date
Fri 17 May 07:34:07 CEST 2019
[~]$ TZ=EST; date
Fri 17 May 02:35:03 EST 2019
[~]$ 这里我首先展示了UTC时间,然后是中欧夏季时间(我的本地TZ),然后是东部标准时间,它在美国东部使用。
选择NTP服务器时,选择本地服务器。这可能意味着印度服务器。你想要尽可能的低延迟和低抖动。这可能意味着您应该使用in.pool.ntp.org,除非您有特殊的需求。
https://askubuntu.com/questions/1143935
复制相似问题