Skip to content

Add CronExpression DST regression tests (#2156)#2927

Merged
lahma merged 1 commit into
3.xfrom
fix/cron-dst-regression-tests-2156
Mar 29, 2026
Merged

Add CronExpression DST regression tests (#2156)#2927
lahma merged 1 commit into
3.xfrom
fix/cron-dst-regression-tests-2156

Conversation

@lahma

@lahma lahma commented Mar 29, 2026

Copy link
Copy Markdown
Member

Summary

Tests added

Test What it covers
IsSatisfiedBy_ShouldReturnTrue_DuringDstFallBack_Issue2156 IsSatisfiedBy at exact fall-back moment, before, and after (CET)
IsSatisfiedBy_ShouldReturnTrue_DuringDstFallBack_WithUtcTimeZone_Issue2156 IsSatisfiedBy with UTC timezone during DST periods
GetTimeAfter_ShouldProduceStrictlyIncreasingTimes_AcrossDstFallBack 90-minute walk across CET fall-back — every result must be strictly increasing
GetTimeAfter_ShouldProduceStrictlyIncreasingTimes_AcrossDstSpringForward 90-minute walk across US Central spring-forward
IsSatisfiedBy_EveryMinuteInOctober_ShouldNotReturnFalseDuringDstFallBack_Issue2156 Exact reproduction from #2156 — minute-by-minute iteration through October across the CET fall-back

Investigation

Investigated whether CronExpression needs additional DST fixes beyond what #2885 provided. Conclusion: no code fix needed. The fall-back guard at CronExpression.cs:2065-2076 correctly handles both the GetTimeAfter backwards-time-travel and the IsSatisfiedBy false-negative scenarios.

Closes #2156

Test plan

  • All 9 DST tests pass on net10.0 and net472

🤖 Generated with Claude Code

…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
lahma merged commit 55c9933 into 3.x Mar 29, 2026
12 of 13 checks passed
@lahma
lahma deleted the fix/cron-dst-regression-tests-2156 branch March 29, 2026 07:46
@sonarqubecloud

Copy link
Copy Markdown

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