Fix execution date range comparisons across time zones - #723
Open
xujiantop-crypto wants to merge 1 commit into
Open
xujiantop-crypto wants to merge 1 commit into
xujiantop-crypto wants to merge 1 commit into
Conversation
Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getExecutionDatesandcountExecutionsomit an execution exactly at the end of a range when the end uses a different zone from the execution. For example, the daily0 9 * * *schedule between2026-01-01T00:00Zand2026-01-01T10:00+01:00[Europe/Paris]currently returns no executions instead of the09:00Zexecution.Compare the range bounds by instant using
isAfter, consistently with the existingisBeforecomparisons. 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 testpasses 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.