Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproduce bug where dst leap is passed on to subsequent occurences #647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions tests/VObject/Recur/RRuleIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,64 @@ public function testDailyBySetPosLoop(): void
);
}

/**
* @dataProvider dstTransitionProvider
*/
public function testDailyOnDstTransition(string $start, array $expected): void
{
$this->parse(
'FREQ=DAILY;INTERVAL=1;COUNT=5',
$start,
$expected,
null,
'Europe/Zurich',
);
}

public function dstTransitionProvider(): iterable
{
yield 'On transition start' => [
'Start' => '2023-03-24 02:00:00',
'Expected' => [
'2023-03-24 02:00:00',
'2023-03-25 02:00:00',
'2023-03-26 03:00:00',
'2023-03-27 02:00:00',
'2023-03-28 02:00:00',
],
];
yield 'During transition' => [
'Start' => '2023-03-24 02:15:00',
'Expected' => [
'2023-03-24 02:15:00',
'2023-03-25 02:15:00',
'2023-03-26 03:15:00',
'2023-03-27 02:15:00',
'2023-03-28 02:15:00',
],
];
yield 'On transition end' => [
'Start' => '2023-03-24 03:00:00',
'Expected' => [
'2023-03-24 03:00:00',
'2023-03-25 03:00:00',
'2023-03-26 03:00:00',
'2023-03-27 03:00:00',
'2023-03-28 03:00:00',
],
];
yield 'After transition end' => [
'Start' => '2023-03-24 03:15:00',
'Expected' => [
'2023-03-24 03:15:00',
'2023-03-25 03:15:00',
'2023-03-26 03:15:00',
'2023-03-27 03:15:00',
'2023-03-28 03:15:00',
],
];
}

public function testWeekly(): void
{
$this->parse(
Expand Down
Loading