Skip to content

fix: /retro midnight-aligned dates + local timezone (v0.7.2)#199

Merged
garrytan merged 3 commits intomainfrom
garrytan/retro-date-range-fix
Mar 19, 2026
Merged

fix: /retro midnight-aligned dates + local timezone (v0.7.2)#199
garrytan merged 3 commits intomainfrom
garrytan/retro-date-range-fix

Conversation

@garrytan
Copy link
Owner

Summary

  • /retro date ranges now align to midnight instead of the current time. Running /retro at 9pm no longer silently drops the morning of the start date — you get full calendar days.
  • /retro timestamps now use your local timezone instead of hardcoded Pacific time. Users outside the US-West coast get correct local hours in histograms, session detection, and streak tracking.

Test Coverage

All new code paths have test coverage. 338 tests pass, 0 failures.

Pre-Landing Review

No issues found.

TODOS

No TODO items completed in this PR.

Test plan

  • All skill validation tests pass (338 tests)
  • No America/Los_Angeles or Pacific time references remain in retro template
  • Generated SKILL.md matches template after regeneration

🤖 Generated with Claude Code

garrytan and others added 3 commits March 18, 2026 21:34
/retro was using --since="7 days ago" which is relative to current time,
so running at 9pm gives a misleading "Mar 11 to Mar 18" title when data
actually starts at 9pm Mar 11. Now computes absolute midnight-aligned
start dates (--since="2026-03-11") for full calendar days.

Also removes hardcoded Pacific time (TZ=America/Los_Angeles) throughout
the template — all timestamps now use the user's local timezone, which
is correct for a global user base.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@garrytan garrytan merged commit 2a20692 into main Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant