- Shipped
- 12 Agosti 2026, 00:09 UTC
- Author
- Kamo
- Commit
- c00cbba
Resolved intervals become per-business-date seconds, ready for the allocator. An interval is SPLIT at every workday boundary it crosses: a 22:00-06:00 shift under a midnight workday is 2 hours on one date and 6 on the next. Attributing the whole span to its start date makes daily overtime and the seventh-day rule wrong for every night worker. This is deliberately a DIFFERENT attribution from the businessDate persisted on the punch. The punch carries one date -- for meal/rest evaluation, the exception queue and what the employee sees as their shift -- while overtime counting needs hours apportioned across the workdays and workweeks they actually fell in. Both are correct, both are needed, and conflating them is the trap. A shift crossing the WORKWEEK boundary likewise contributes to two weeks' overtime totals; counting all of it in either one is wrong for both. Accumulates in seconds throughout. Tests cover both DST transitions, a 50-hour span, and punches end-to-end through allocation for a California week.