Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 7 自動同步網路時間:設定 Internet 時間伺服器確保精準

編輯:Windows 7 系統介紹

電腦時間漂移會導致 SSL 憑證驗證失敗、排程任務錯亂、日誌時間戳錯誤。Win 7 內建 Windows Time 服務,可自動同步 Internet 時間伺服器(預設 time.windows.com),設定一次永久精準。

設定步驟

  1. 工作列右下角時間 → 「變更日期和時間設定」→「網際網路時間」索引標籤。
  2. 「變更設定」→ 勾選「與網際網路時間伺服器同步處理」。
  3. 伺服器下拉選單選擇或手動輸入:
    • time.windows.com(微軟預設,全球 CDN)
    • pool.ntp.org(全球志願者 NTP 集群,極高可用性)
    • time.nist.gov(美國國家標準局原子鐘)
    • time.google.com(Google Public NTP,支援閏秒平滑)
    • time.cloudflare.com(Cloudflare NTP,Anycast 低延遲)
    • 台灣地區推薦:time.stdtime.gov.tw(國家標準時間中心)、watch.stdtime.gov.tw
  4. 「立即更新」→ 確定 → 關閉。

進階:命令列強制同步與偵錯

w32tm /resync /nowait          # 立即同步
w32tm /query /status            # 查看同步狀態、來源、誤差
w32tm /query /configuration     # 查看完整設定
w32tm /config /manualpeerlist:"time.google.com time.cloudflare.com" /syncfromflags:manual /reliable:yes /update

常見問題

現象原因解決
同步失敗「電腦未與網際網路時間伺服器同步處理」時間差過大(>15分鐘)、防火牆封鎖 UDP 123、DNS 解析失敗手動調整時間接近正確值 → 開放防火牆 UDP 123 輸出 → 檢查 DNS
時間總是慢/快幾秒主機板電池 (CR2032) 耗盡、NTP 輪詢間隔過長更換主機板電池 → 註冊表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval 縮短至 3600 (1小時) 或 900 (15分鐘)
虛擬機器時間漂移嚴重Host 時間不同步、未安裝 Integration Services/VMware Tools安裝客體工具 → 啟用時間同步功能 → Host 同步 NTP

企業環境建議

  • 部署內部 NTP 伺服器(Windows Server 啟用 W32Time 可靠時間來源,或 Linux chrony/ntpd)。
  • 群組原則統一設定:gpedit.msc → 電腦設定 → 系統管理範本 → 系統 → Windows Time 服務 → 時間提供者 → 設定對等清單。
  • 關鍵系統(資料庫、AD、PKI)時間誤差需 <1 秒,採用 GPS/PPS 硬體時鐘源。

一鍵設定自動同步,告別手動校時,保障 SSL、Kerberos、日誌審計、排程任務等時間敏感服務正常運作。

Copyright © Windows教程網 All Rights Reserved