Files
ontime/packages/utils
Claude 05c000118b fix(timer): keep day offset on count-to-end scheduled end
getExpectedEnd compared the offset-laden expectedStart against a raw
`timeStart + duration + delay` planned end. That planned end omits the
`(dayOffset - currentDay) * dayInMs` day shift that expectedStart already
carries, so for a count-to-end event on a later day the Math.max guard
returned the day-shifted start instead of the day-shifted end (wrong by
one duration).

Compute the scheduled end in the same day-normalised space before the
guard. The guard itself (finish on schedule unless the start is
compromised) is unchanged.

Add unit tests for the multi-day case, the compromised-start guard, and
relative mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ACGuFWt5aN7Fv3AkYXgxLm
2026-06-21 09:37:11 +00:00
..
2026-03-08 16:22:12 +01:00
2026-03-08 16:22:12 +01:00
2026-03-08 16:22:12 +01:00
2026-03-08 16:22:12 +01:00
2026-03-08 16:22:12 +01:00
2023-05-18 14:02:22 +02:00