Fix game times with UTC data, restructure schedule by date
- Update games_canonical.json to use ISO 8601 UTC timestamps (game_datetime_utc) - Fix BootstrapService timezone-aware parsing for venue-local fallback - Fix thread-unsafe shared DateFormatter in RichGame local time display - Bump SchemaVersion to 4 to force re-bootstrap with correct UTC data - Restructure schedule view: group by date instead of sport, with sport icons on each row and date section headers showing game counts - Fix schedule row backgrounds using Theme.cardBackground instead of black - Sort games by UTC time with local-time tiebreaker for same-instant games Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,15 +130,11 @@ struct RichGame: Identifiable, Hashable, Codable {
|
||||
|
||||
/// Game time formatted in the stadium's local timezone with timezone indicator
|
||||
var localGameTime: String {
|
||||
let formatter = GameFormatters.localTimeFormatter
|
||||
formatter.timeZone = stadium.timeZone ?? .current
|
||||
return formatter.string(from: game.dateTime)
|
||||
game.dateTime.gameTimeString(in: stadium.timeZone, includeZone: true)
|
||||
}
|
||||
|
||||
/// Game time formatted in the stadium's local timezone without timezone indicator
|
||||
var localGameTimeShort: String {
|
||||
let formatter = GameFormatters.localTimeShortFormatter
|
||||
formatter.timeZone = stadium.timeZone ?? .current
|
||||
return formatter.string(from: game.dateTime)
|
||||
game.dateTime.gameTimeString(in: stadium.timeZone)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user