fix(display): use stadium timezone for all game time displays

Game times were incorrectly using device timezone in several views.
Now all game time displays use the stadium's local timezone via
RichGame.localGameTime/localGameTimeShort properties.

Fixes:
- PDFGenerator: was using game.gameDate (midnight UTC) instead of actual time
- GameRowCompact: was formatting with device timezone
- TimelineGameRow: was using .formatted() with device timezone

Also adds Date+GameTime.swift extension for centralized timezone formatting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-20 22:44:40 -06:00
parent 74fd21590b
commit 166ad5d6f9
4 changed files with 75 additions and 9 deletions

View File

@@ -1118,9 +1118,7 @@ struct GameRowCompact: View {
let colorScheme: ColorScheme
private var formattedTime: String {
let formatter = DateFormatter()
formatter.dateFormat = "h:mm a" // "8:00 PM"
return formatter.string(from: richGame.game.dateTime)
richGame.localGameTimeShort // Stadium local time
}
var body: some View {