}
// Overall range to scan for event times
- $from = new DateTime($recurData['from_date']['date']);
- $to = new DateTime($recurData['to_date']['date']);
+ $from = new DateTime($recurData['from_date']['date'].' 00:00');
+ $to = new DateTime($recurData['to_date']['date'].' 00:00');
// Calculate interval for single event - If start time only, then start and end are the same
$start = new DateTime($recurData['start_time']['datetime']);
$dates[$start->getTimestamp()] = $start;
}
- // Create From and to timestamp for comparison
+ // Create From and to timestamp for comparison - Make to date +1 day
$fromTime = $from->getTimestamp();
+ $to->modify('+1 day');
$toTime = $to->getTimestamp();
// Check for $replace, if so delete all existing entries and custom events