
私のUbuntu16.04.5 PC
は にありますDelhi, India
。
システム クロックを USA 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.com
出力は次のようntpq -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) のままです。何が間違っているのでしょうか?
答え1
NTPA のいつも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
特別な要件がない限り、 を使用する必要があることを意味します。