add error check when loading time location

This commit is contained in:
2026-02-17 20:10:30 +03:00
parent d193e9d7a2
commit 36fab5e2c0

View File

@@ -376,7 +376,11 @@ func main() {
return
}
loc, _ := time.LoadLocation("Europe/Moscow")
loc, err := time.LoadLocation("Europe/Moscow")
if err != nil {
http.Error(w, fmt.Sprintf("failed to load time location: %v", err), 500)
return
}
for _, episode := range episodes {
episode.CreatedAt = episode.CreatedAt.In(loc)
}