feat(webui): sync host clock and timezone from browser

Adds POST /api/system/time-sync so the dashboard's "Sync with this
browser" button can set the host's date, time, and IANA timezone from
the client's browser — useful for appliances with no NTP/network
access to keep their own clock straight. Disables NTP before writing
the manual time so it doesn't get immediately overwritten.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-08-06 13:43:31 +03:00
co-authored by Claude Sonnet 5
parent b2b3f86c8d
commit 3ec7ca08da
2 changed files with 56 additions and 0 deletions
+1
View File
@@ -346,6 +346,7 @@ func NewHandler(opts HandlerOptions) http.Handler {
mux.HandleFunc("POST /api/system/install-to-ram", h.handleAPIInstallToRAM)
mux.HandleFunc("POST /api/system/reboot", h.handleAPISystemReboot)
mux.HandleFunc("POST /api/system/shutdown", h.handleAPISystemShutdown)
mux.HandleFunc("POST /api/system/time-sync", h.handleAPISystemTimeSync)
// Preflight
mux.HandleFunc("GET /api/preflight", h.handleAPIPreflight)