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

When UNTIL < DSTART then event never happens #371

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions lib/Recur/RRuleIterator.php
Expand Up @@ -733,18 +733,6 @@ protected function parseRRule($rrule) {

case 'UNTIL' :
$this->until = DateTimeParser::parse($value, $this->startDate->getTimezone());

// In some cases events are generated with an UNTIL=
// parameter before the actual start of the event.
//
// Not sure why this is happening. We assume that the
// intention was that the event only recurs once.
//
// So we are modifying the parameter so our code doesn't
// break.
if ($this->until < $this->startDate) {
$this->until = $this->startDate;
}
break;

case 'INTERVAL' :
Expand Down
4 changes: 1 addition & 3 deletions tests/VObject/Recur/RRuleIteratorTest.php
Expand Up @@ -890,9 +890,7 @@ function testUntilBeforeDtStart() {
$this->parse(
'FREQ=DAILY;UNTIL=20140101T000000Z',
'2014-08-02 00:15:00',
[
'2014-08-02 00:15:00',
]
[]
);

}
Expand Down