Skip to content

CronExpression fails to calculate properly next execution when running on the day of winter daylight saving time #28095

Closed
@guilroux

Description

@guilroux

Affects: Spring Framework 5.3.16

The PR #28044 fixing the issue #28038 did cause a regression for winter daylight saving time

Problem: CronExpression fails to calculate properly next execution when running on the day of winter daylight saving time, just before DST is applied.

Here is a unit test case that you can add to CronExpressionTests#daylightSaving to reproduce the problem :

cronExpression = CronExpression.parse("0 5 0 * * *");

last = ZonedDateTime.parse("2019-10-27T01:05+02:00[Europe/Paris]");
expected = ZonedDateTime.parse("2019-10-28T00:05+01:00[Europe/Paris]");
actual = cronExpression.next(last);
assertThat(actual).isNotNull();
assertThat(actual).isEqualTo(expected);

Please note that in the previous version 5.3.15 everything worked fine for that case

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions