доработка текущего времени raspberry на экране

This commit is contained in:
Maxim
2026-06-16 13:22:17 +03:00
parent 875aa8a054
commit bc40c1437a
7 changed files with 35 additions and 6 deletions

View File

@@ -42,6 +42,8 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) {
status = "Нет связи"
}
now := time.Now()
writeJSON(w, map[string]any{
"status": status,
"uptime_sec": time.Since(a.startTime).Seconds(),
@@ -50,6 +52,7 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) {
"has_data": ok,
"latest": latest,
"stats": a.buf.Stats(),
"server_time": now.Format("02.01.2006 15:04"),
})
}