From 931554b911f40e9cef1dabf9751033c9b849fe11 Mon Sep 17 00:00:00 2001 From: phlux Date: Fri, 1 Nov 2024 08:40:38 -0400 Subject: [PATCH] Actually display times in Eastern --- internal/clients/cfbd_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/clients/cfbd_client.go b/internal/clients/cfbd_client.go index 20effeb..b838987 100644 --- a/internal/clients/cfbd_client.go +++ b/internal/clients/cfbd_client.go @@ -50,10 +50,12 @@ func GetGameInfo(teamName string) string { for _, game := range games { startTime, _ := time.Parse(time.RFC3339, game.StartDateTime) + eastern := time.LoadLocation("America/New_York") + startTimeEastern := startTime.In(eastern) if time.Now().After(startTime) && game.HomePoints != nil && game.AwayPoints != nil { return fmt.Sprintf("%s: %d %s: %d", game.AwayTeam, *game.AwayPoints, game.HomeTeam, *game.HomePoints) } else if time.Now().Before(startTime) { - return fmt.Sprintf("%s @ %s %s Eastern", game.AwayTeam, game.HomeTeam, startTime.Format("03:04 PM")) + return fmt.Sprintf("%s @ %s %s Eastern", game.AwayTeam, game.HomeTeam, startTimeEastern.Format("03:04 PM")) } }