Add CronExpression DST regression tests (#2156)#2927
Merged
Conversation
…After (#2156) The fall-back guard added in #2885 resolved the CronExpression DST issues reported in #2156 and #2475. These tests lock in the fix with coverage for: - IsSatisfiedBy during DST fall-back transition (exact #2156 reproduction) - IsSatisfiedBy with UTC timezone during DST periods - GetTimeAfter monotonicity across fall-back (90-minute walk) - GetTimeAfter monotonicity across spring-forward (90-minute walk) - Full minute-by-minute iteration through October across CET fall-back Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
lahma
added a commit
that referenced
this pull request
Mar 29, 2026
…etTimeAfter (#2156) (#2927) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
lahma
added a commit
that referenced
this pull request
Mar 29, 2026
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
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.



Summary
CronExpression.IsSatisfiedByandGetTimeAfterduring DST transitionsTests added
IsSatisfiedBy_ShouldReturnTrue_DuringDstFallBack_Issue2156IsSatisfiedByat exact fall-back moment, before, and after (CET)IsSatisfiedBy_ShouldReturnTrue_DuringDstFallBack_WithUtcTimeZone_Issue2156IsSatisfiedBywith UTC timezone during DST periodsGetTimeAfter_ShouldProduceStrictlyIncreasingTimes_AcrossDstFallBackGetTimeAfter_ShouldProduceStrictlyIncreasingTimes_AcrossDstSpringForwardIsSatisfiedBy_EveryMinuteInOctober_ShouldNotReturnFalseDuringDstFallBack_Issue2156Investigation
Investigated whether
CronExpressionneeds additional DST fixes beyond what #2885 provided. Conclusion: no code fix needed. The fall-back guard atCronExpression.cs:2065-2076correctly handles both theGetTimeAfterbackwards-time-travel and theIsSatisfiedByfalse-negative scenarios.Closes #2156
Test plan
🤖 Generated with Claude Code