I need to go to the next appointment which happens at the same time every day that's being modified, but when I modify it by the next interval day, it wipes the hours and minutes to 00:00
I've tried everything I can think of
foreach($recurring_appt as $ra)
{ //check for recurring appts next occurance
$check_rec_stop_date = new DateTime($ra->stop_recurring);
if($check_rec_stop_date >= $end_date){
$i=0;
if($ra->start_date <= $start_date->format('Y-m-d H:i:s')){
$t = new DateTime($ra->start_date);
$mod = 'next '.$days[$i][0];
$check_rec = clone $t->modify($mod);
echo $check_rec->format('m-d');
if($check_rec->format('m-d') == $start_date->format('m-d')){
array_push($rec_start_block,(new DateTime($ra->start_date))->modify($mod));
array_push($rec_end_block, (new DateTime($ra->end_date))->modify($mod));
}
}
// elseif()
}
$i++;
}
as I said - this modifies the date correctly to the next occurance of that appointment, but i resets the clock to 0:00 when I need it to keep that information, just modify the day (and month if applicable)