設定用戶端
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Apple macOS (OS X)
- 開啟「系統偏好設定」。
- 選擇「日期和時間」面板。
- 按一下鎖頭即可變更設定。
- 輸入你的密碼。
- 選取「日期和時間」。
- 在「自動設定日期和時間」旁邊的方塊中,輸入
time.google.com
。
Cisco IOS 和 NX-OS
router# config t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)# no ntp server
router(config)# ntp server time1.google.com
router(config)# ntp server time2.google.com
router(config)# ntp server time3.google.com
router(config)# ntp server time4.google.com
router(config)# copy running-config startup-config
Google Compute Engine
雖然您可以從 Compute Engine 使用 Google 公開 NTP,但私人雲端伺服器會使用相同的抹除方法提供相同的時間,因此效能會更好。請按照這些說明操作。
Juniper Junos
NTP 是在 [edit system ntp]
階層層級設定:
system {
ntp {
server time1.google.com;
server time2.google.com;
server time3.google.com;
server time4.google.com;
}
}
Linux
ntpd
或 chrony
- 使用慣用的文字編輯器編輯
/etc/ntp.conf
或 /etc/chrony/chrony.conf
(視您使用的服務而定)。
- 移除或註解掉以
server
開頭的任何行,避免機器嘗試混合使用已抹除和未抹除的伺服器。
新增以下幾行:
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst
使用 sudo service ntp reload
或 sudo
service chrony force-reload
重新啟動 NTP/chrony Daemon。
systemd-timesyncd
- 編輯「
/etc/systemd/timesyncd.conf
」
將 [Time]
區塊的內容設為:
[Time]
NTP=
FallbackNTP=time.google.com
如果將 NTP=
保持為未註解狀態,並指派給空字串,系統就會重設 NTP 伺服器清單,包括任何介面指派項目。這可防止在時間伺服器之間無意中移動。將 Google 公開 NTP 設為備援伺服器後,系統會選取該伺服器做為唯一的 NTP 伺服器。
以具備適當權限的使用者身分,使用 systemctl restart
systemd-timesyncd.service
重新啟動 systemd-timesyncd
使用 timedatectl
show-timesync | grep ServerName
確認系統是否使用 Google Public NTP。如果設定成功,輸出內容會顯示:ServerName=time.google.com
Microsoft Windows
- 開啟控制台。
- 按一下「日期與時間」圖示。
- 選擇「網際網路時間」分頁標籤。(如果電腦屬於網域,則無法使用這項功能。在這種情況下,系統會與網域控制站同步時間。您可以將控制器設定為使用 Google 公開 NTP。)
- 按一下「變更設定...」按鈕。
- 勾選「與網際網路時間伺服器同步」方塊。
- 在「伺服器:」旁邊輸入
time.google.com
。
Microsoft Windows Server
按照 Microsoft 的操作說明更新登錄檔。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThis guide provides instructions for configuring various operating systems and network devices to utilize Google Public NTP servers for time synchronization.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Public NTP offers improved performance compared to other NTP sources, especially within Google Compute Engine.\u003c/p\u003e\n"],["\u003cp\u003eThe configurations typically involve specifying \u003ccode\u003etime.google.com\u003c/code\u003e or a series of Google NTP server addresses (time1.google.com, time2.google.com, etc.) in your system's time settings or configuration files.\u003c/p\u003e\n"],["\u003cp\u003eDepending on your platform, you may need to restart specific services or daemons for the changes to take effect.\u003c/p\u003e\n"],["\u003cp\u003eFor domain-joined Windows PCs and Windows Servers, special considerations or registry modifications may be necessary.\u003c/p\u003e\n"]]],["To configure systems to use Google Public NTP, users must specify `time.google.com` as the NTP server in their system settings. On macOS, this involves adjusting the \"Date & Time\" panel. Cisco devices use commands such as `no ntp server` and `ntp server`. Linux requires editing configuration files like `/etc/ntp.conf` or `/etc/systemd/timesyncd.conf`, followed by service restarts. Windows involves adjusting the \"Internet Time\" settings, while Windows Server requires registry modifications. Juniper devices modify the ntp settings under the system configuration.\n"],null,[]]