From 1e7819e1aaa8d00fab113997a1eeabd08dfd10d0 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 31 Mar 2022 03:45:59 +0400 Subject: [PATCH] Hmm, time conversion fails, let's see what happened. --- internal/handlers/handlers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 60b72e2..485df61 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -118,8 +118,11 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, r *http.Request) { } for _, song := range songs { - if tim, err := time.Parse("15:04-0700", song.Time); err == nil { + tim, err := time.Parse("15:04-0700", song.Time) + if err == nil { song.Time = utils.ToClientTimezone(tim, r).Format("15:04") + } else { + h.logErr.Println("song time parse error:", err) } }