From 2069e839e6e41f638561286a9c95aeb715451539 Mon Sep 17 00:00:00 2001 From: deepak-srivastava Date: Wed, 3 Jun 2015 09:50:43 +0100 Subject: [PATCH] CRM-16563 include end-date by using time 23:59 than incrementing by day 1 ---------------------------------------- * CRM-16563: Recurring event system sometimes suggests incorrect dates https://issues.civicrm.org/jira/browse/CRM-16563 --- CRM/Core/BAO/RecurringEntity.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/RecurringEntity.php b/CRM/Core/BAO/RecurringEntity.php index 5402d5a3a5..dae4dd10d3 100644 --- a/CRM/Core/BAO/RecurringEntity.php +++ b/CRM/Core/BAO/RecurringEntity.php @@ -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); } -- 2.25.1