Skip to content
Console

ExpTech NTP Server

This content is not available in your language yet.

越來越多 ExpTech 相關產品及服務需要時間同步。在 ttyAMA0 (GitHub @bclswl0827) 的幫助下,剛好有這個機會,我自己又加了一點料,就有了 ExpTech NTP Server,也把舊的時間同步機制一起整理過。

早期是一個很簡單的 HTTP 服務,Body 回傳 Unix Timestamp(text/plain)。當時對時間精度沒有特別要求,這個陽春版撐了很久。

現在改在 time.exptech.com.tw:123 提供 SNTP(UDP),同時保留 HTTP,給不能用 UDP 的環境(例如網頁)對時。

先拿幾個常見的公共 NTP Server 對照:

Google NTP Server
Google NTP Server
Cloudflare NTP Server
Cloudflare NTP Server
Apple NTP Server
Apple NTP Server
TW NTP Server
TW NTP Server

最後是主角,ExpTech 自家的 NTP Server:

ExpTech NTP Server

SNTP 之外,也可以用 HTTP 拿時間:

  • Header 會回傳 X-NTP-T2、X-NTP-T3
  • Body 仍回傳 Unix Timestamp(text/plain),向下相容舊架構
ExpTech NTP (HTTP) Server
協定 誤差 說明
SNTP 約 ±5ms 精度表現很好,實測相當穩定
HTTP 約 ±50ms 主要是 TCP 開銷。精度不如 SNTP,但在網頁這類不能用 UDP 的情境仍然很實用

依照實際使用環境選 SNTP 或 HTTP,不同平台都能維持不錯的時間同步。

感謝 台灣數位串流有限公司 TWDS(Taiwan Digital Streaming) 提供伺服器贊助,ExpTech NTP Server 才能穩定運作。

TWDS LogoTWDS Logo