From: deepak-srivastava Date: Wed, 3 Jun 2015 08:50:43 +0000 (+0100) Subject: CRM-16563 include end-date by using time 23:59 than incrementing by day 1 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2069e839e6e41f638561286a9c95aeb715451539;p=civicrm-core.git 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 --- 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); }