I have lost more hours than I want to admit to problems that turned out not to be the network or the app or the API, but just bad time.We already have NTP, PTP (IEEE-1588), linuxptp, real grandmasters, fancy NICs. That鈥檚 not what this is about. I wanted a super cheap way for a person holding an Android/iPad/laptop to answer exactly one question:Is it me or is it the edge box?So I built a single-file web app for that.It鈥檚 just one HTML file you can stick in GitHub, serve from nginx on the local gateway, and tell a tech:Open /probe and if it鈥檚 green, it鈥檚 not you.This is not a PTP/IEEE-1588 monitor and it will not give you sub-碌s accuracy. It also won鈥檛 prove the server is telling the truth.It is just a browser-level sanity probe. It compares Date.now() (client) to /time (server), draws a tiny sparkline, and goes green/red. Because it鈥檚 a PWA you can "Add to Home Screen" and keep it around.In short, it tells you:You and this server disagree by ~X ms and the disagreement is / isn鈥檛 stable.That鈥檚 enough to stop chasing ghosts.Field people already have a browser. They can hit http://192.168.10.1/time. They can bookmark a page. This can run in places where you can鈥檛 run linuxptp but you can still be confused by time drift.The /time endpointServer side is just a dumb route that returns wall time (system CLOCK_REALTIME) as JSON, with CORS open so phones can call it:{ "epoch_ms": 1730615400000 } That鈥檚 it.The one-file PWAHere鈥檚 the whole thing:<!doctype html> <html> <head> <meta charset="utf-8" /> <title>Edge Time Probe (Debug)</title> <meta name="viewport" content="width=device-width,initial-scale=1" /> <style> body { font-family: system-ui, sans-serif; margin: 1.5rem; } h1 { font-size: 1.25rem; margin-bottom: .5rem; } #status { font-weight: 600; } #status.good { color: #0a0; } #status.bad { color: #c00; } canvas { border: 1px solid #ddd; margin-top: .75rem; } small, #diag, #err { color:#555; display:block; margin-top:.5rem; } #err { color:#a00; white-space:pre-wrap; } code...
First seen: 2025-11-14 01:50
Last seen: 2025-11-14 07:50