Skip to content

Fix execution date range comparisons across time zones - #723

Open
xujiantop-crypto wants to merge 1 commit into
jmrozanec:masterfrom
xujiantop-crypto:fix/execution-date-timezone-boundaries
Open

xujiantop-crypto wants to merge 1 commit into
jmrozanec:masterfrom
xujiantop-crypto:fix/execution-date-timezone-boundaries

Conversation

@xujiantop-crypto

Copy link
Copy Markdown

getExecutionDates and countExecutions omit an execution exactly at the end of a range when the end uses a different zone from the execution. For example, the daily 0 9 * * * schedule between 2026-01-01T00:00Z and 2026-01-01T10:00+01:00[Europe/Paris] currently returns no executions instead of the 09:00Z execution.

Compare the range bounds by instant using isAfter, consistently with the existing isBefore comparisons. This also rejects start and end values that represent the same instant in different zones, as required by the documented strictly increasing range contract. Execution dates retain the start date's zone.

Validation: all 6 added parameterized cases fail before the fix. mvn -B test passes on Temurin 21: 808 tests, 0 failures, 0 errors, 57 skipped. Coverage includes different offsets, UTC zone aliases, inclusive end bounds, a bound one nanosecond before the execution, and zero-length intervals.

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
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