From 275cbc0b30121d3273f7fd428583e8c48ce7d017 Mon Sep 17 00:00:00 2001 From: T Date: Thu, 21 Aug 2025 16:24:45 -0600 Subject: fix time zones --- internal/tui/shared.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/tui/shared.go') diff --git a/internal/tui/shared.go b/internal/tui/shared.go index c81827a..8a36108 100644 --- a/internal/tui/shared.go +++ b/internal/tui/shared.go @@ -285,7 +285,7 @@ func getAppData( return } - now := time.Now().UTC() + now := time.Now().Local() todayY, todayM, todayD := now.Date() lastMon := mostRecentMonday(now) inDay := true @@ -298,7 +298,7 @@ func getAppData( } if inDay { - y, m, d := e.StartTime.Date() + y, m, d := e.StartTime.Local().Date() if y != todayY || m != todayM || d != todayD { inDay = false } @@ -322,7 +322,7 @@ func getAppData( } func mostRecentMonday(from time.Time) time.Time { - d := dateOnly(from) + d := dateOnly(from.Local()) dayOffset := time.Duration(d.Weekday()-1) % 7 return d.Add(-time.Hour * 24 * dayOffset) } -- cgit v1.2.3