summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/tui/shared.go6
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)
}