diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 990b7a7..82bdb6d 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -81,7 +81,7 @@ func (h *RadioHandlers) Index(w http.ResponseWriter, r *http.Request) { } for i := 0; i < len(songs); i++ { - if tim, err := time.Parse("15:04-0700", songs[i].Time); err == nil { + if tim, err := time.Parse(radio.SongTimeFormat, songs[i].Time); err == nil { songs[i].Time = utils.ToClientTimezone(tim, r).Format("15:04") } } @@ -127,7 +127,7 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, r *http.Request) { return } - if tim, err := time.Parse("15:04-0700", song.Time); err == nil { + if tim, err := time.Parse(radio.SongTimeFormat, song.Time); err == nil { song.Time = utils.ToClientTimezone(tim, r).Format("15:04") }