1
0

Hmm, time conversion fails, let's see what happened.

This commit is contained in:
Alexander Andreev 2022-03-31 03:45:59 +04:00
parent d900d78800
commit 1e7819e1aa
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -118,8 +118,11 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, r *http.Request) {
} }
for _, song := range songs { 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") song.Time = utils.ToClientTimezone(tim, r).Format("15:04")
} else {
h.logErr.Println("song time parse error:", err)
} }
} }