diff --git a/zetaclient/metrics/telemetry.go b/zetaclient/metrics/telemetry.go index a2eac3264a..c78bcd565d 100644 --- a/zetaclient/metrics/telemetry.go +++ b/zetaclient/metrics/telemetry.go @@ -191,7 +191,7 @@ func (t *TelemetryServer) Handlers() http.Handler { router.Handle("/connectedpeers", http.HandlerFunc(t.connectedPeersHandler)).Methods(http.MethodGet) router.Handle("/knownpeers", http.HandlerFunc(t.knownPeersHandler)).Methods(http.MethodGet) router.Handle("/pingrtt", http.HandlerFunc(t.pingRTTHandler)).Methods(http.MethodGet) - router.Handle("/systemtime", http.HandlerFunc(systemdTimeHandler)).Methods(http.MethodGet) + router.Handle("/systemtime", http.HandlerFunc(systemTimeHandler)).Methods(http.MethodGet) router.Use(logMiddleware()) return router @@ -334,10 +334,10 @@ func (t *TelemetryServer) pingRTTHandler(w http.ResponseWriter, _ *http.Request) fmt.Fprintf(w, "%s", string(data)) } -// systemdTimeHandler returns the current system time in seconds -func systemdTimeHandler(w http.ResponseWriter, _ *http.Request) { +// systemTimeHandler returns the current system time in seconds +func systemTimeHandler(w http.ResponseWriter, _ *http.Request) { nowString := time.Now().UTC().Format(time.RFC3339) - fmt.Fprintf(w, "%s", string(nowString)) + fmt.Fprintf(w, "%s", nowString) } // logMiddleware logs the incoming HTTP request