TIME_WINDOW rule dates reached the planner as local-midnight Date objects, and the planner read their Europe/Paris date, so in time zones ahead of Paris every window started and ended one day early.
PlanningCalculationService.request now formats startDate and endDate as YYYY-MM-DD from local components, as balance dates already are. Other rule types pass through unchanged.
Tests
New case in planning-calculation.service.spec.ts, run in Pacific/Auckland: fails before the fix (the planner received the instant 2026-12-19T11:00Z), passes after. It also fails if the dates are converted to their Paris date instead.
Full suite 765/765, typecheck, prettier and eslint clean at base 9e5c93e.
Real-planner probes in Auckland, Tokyo and Kiritimati: before the fix the window moved to the previous Sunday and planning conflicted; after it the leave lands on the picked date, including after a save and reload. New York, Paris and UTC were unaffected either way.
Known limit
A device that changes time zone between saving and planning can still read a saved rule as another date (noted in the issue).
## Summary
- TIME_WINDOW rule dates reached the planner as local-midnight `Date` objects, and the planner read their Europe/Paris date, so in time zones ahead of Paris every window started and ended one day early.
- `PlanningCalculationService.request` now formats `startDate` and `endDate` as `YYYY-MM-DD` from local components, as balance dates already are. Other rule types pass through unchanged.
## Tests
- New case in `planning-calculation.service.spec.ts`, run in `Pacific/Auckland`: fails before the fix (the planner received the instant `2026-12-19T11:00Z`), passes after. It also fails if the dates are converted to their Paris date instead.
- Full suite 765/765, typecheck, prettier and eslint clean at base `9e5c93e`.
- Real-planner probes in Auckland, Tokyo and Kiritimati: before the fix the window moved to the previous Sunday and planning conflicted; after it the leave lands on the picked date, including after a save and reload. New York, Paris and UTC were unaffected either way.
## Known limit
A device that changes time zone between saving and planning can still read a saved rule as another date (noted in the issue).
Closes #311
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Rule windows reached the planner as local-midnight Date objects, and the
planner read their Europe/Paris date, so east of Paris every window
started and ended one day early. Format them from local components as
YYYY-MM-DD before planning, as balances already are.
Closes#311
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Dateobjects, and the planner read their Europe/Paris date, so in time zones ahead of Paris every window started and ended one day early.PlanningCalculationService.requestnow formatsstartDateandendDateasYYYY-MM-DDfrom local components, as balance dates already are. Other rule types pass through unchanged.Tests
planning-calculation.service.spec.ts, run inPacific/Auckland: fails before the fix (the planner received the instant2026-12-19T11:00Z), passes after. It also fails if the dates are converted to their Paris date instead.9e5c93e.Known limit
A device that changes time zone between saving and planning can still read a saved rule as another date (noted in the issue).
Closes #311
🤖 Generated with Claude Code
0b8424503ctobc5ee50bd5