diff options
author | T <t@tjp.lol> | 2025-08-21 16:24:45 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-21 18:07:41 -0600 |
commit | 275cbc0b30121d3273f7fd428583e8c48ce7d017 (patch) | |
tree | 3fd5ca1ed645f8f8287d68a517824093b7a8dbfb /internal/tui | |
parent | 70dcaa2f10591ae76d908c93980babe205e4a884 (diff) |
fix time zones
Diffstat (limited to 'internal/tui')
-rw-r--r-- | internal/tui/shared.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) } |