Skip to content

Commit

Permalink
Fix timezone offset in CronExpressionTests
Browse files Browse the repository at this point in the history
  • Loading branch information
poutsma authored and lxbzmy committed Mar 26, 2022
1 parent 1414a15 commit 7e80f12
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -1266,13 +1266,13 @@ public void daylightSaving() {
CronExpression cronExpression = CronExpression.parse("0 0 9 * * *");

ZonedDateTime last = ZonedDateTime.parse("2021-03-27T09:00:00+01:00[Europe/Amsterdam]");
ZonedDateTime expected = ZonedDateTime.parse("2021-03-28T09:00:00+01:00[Europe/Amsterdam]");
ZonedDateTime expected = ZonedDateTime.parse("2021-03-28T09:00:00+02:00[Europe/Amsterdam]");
ZonedDateTime actual = cronExpression.next(last);
assertThat(actual).isNotNull();
assertThat(actual).isEqualTo(expected);

last = ZonedDateTime.parse("2021-10-30T09:00:00+01:00[Europe/Amsterdam]");
expected = ZonedDateTime.parse("2021-10-31T09:00:00+02:00[Europe/Amsterdam]");
last = ZonedDateTime.parse("2021-10-30T09:00:00+02:00[Europe/Amsterdam]");
expected = ZonedDateTime.parse("2021-10-31T09:00:00+01:00[Europe/Amsterdam]");
actual = cronExpression.next(last);
assertThat(actual).isNotNull();
assertThat(actual).isEqualTo(expected);
Expand Down

0 comments on commit 7e80f12

Please sign in to comment.