Test fixes for All kind of Custom Values
[civicrm-core.git] / CRM / Core / BAO / RecurringEntity.php
index 5402d5a3a5c9727a5bdd5df0e5122d9b150ede7e..dae4dd10d3860e414f07b86abb0927d68603561c 100644 (file)
@@ -1082,8 +1082,9 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
 
       if (!empty($scheduleReminderDetails['absolute_date'])) {
         $absoluteDate = CRM_Utils_Date::setDateDefaults($scheduleReminderDetails['absolute_date']);
-        $endDate = new DateTime($absoluteDate[0] . ' ' . $absoluteDate[1]);
-        $endDate->modify('+1 day');
+        // absolute_date column of scheduled-reminder table is of type date (and not datetime)
+        // and we always want the date to be included, and therefore appending 23:59
+        $endDate = new DateTime($absoluteDate[0] . ' ' . '23:59');
         $r->until($endDate);
       }