Skip to content

Commit

Permalink
Issue #17: Stop based on Date not inclusive (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela authored May 6, 2022
1 parent ca7b6e7 commit 87048d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion repeating_dates.module
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ function _repeating_dates_build_rrule($rrule, $start_date) {
}

if ($rrule['stopby'] == 'date') {
$until = new DateTime($rrule['until']);
// Apply start date time offset to date only 'until' string.
$full_until_string = $rrule['until'] . ' ' . $start_date->format('H:i:s');
$until = new DateTime($full_until_string);
// Convert 'until' to UTC.
$until->setTimezone(new DateTimeZone('UTC'));
$components[] = 'UNTIL=' . $until->format('Ymd\THis\Z');
}
else {
Expand Down

0 comments on commit 87048d5

Please sign in to comment.