Use time format specified in radio package.
This commit is contained in:
parent
88e047d210
commit
6f607c830e
@ -81,7 +81,7 @@ func (h *RadioHandlers) Index(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < len(songs); i++ {
|
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")
|
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
|
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")
|
song.Time = utils.ToClientTimezone(tim, r).Format("15:04")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user