From aeadc6bfe98bb01931808ee904c20ac5a1995464 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Wed, 12 Oct 2016 15:52:26 +0530 Subject: [PATCH] CRM-19486: breaks saved search absolute date --- CRM/Contact/BAO/SavedSearch.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CRM/Contact/BAO/SavedSearch.php b/CRM/Contact/BAO/SavedSearch.php index bfc6e10f94..8c810f6150 100644 --- a/CRM/Contact/BAO/SavedSearch.php +++ b/CRM/Contact/BAO/SavedSearch.php @@ -99,11 +99,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch { $result = unserialize($fv); } - //CRM-19250: fetch the default date format to format mysql value as per CRM_Core_Error::addDate() - $dateFormat = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_PreferencesDate', 'searchDate', 'date_format', 'name'); - $dateFormat = empty($dateFormat) ? CRM_Core_Config::singleton()->dateInputFormat : $dateFormat; - $dateFormat = CRM_Utils_Array::value($dateFormat, CRM_Core_SelectValues::datePluginToPHPFormats()); - $specialFields = array('contact_type', 'group', 'contact_tags', 'member_membership_type_id', 'member_status_id'); foreach ($result as $element => $value) { if (CRM_Contact_BAO_Query::isAlreadyProcessedForQueryFormat($value)) { @@ -118,7 +113,7 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch { $result["{$entityName}_date_relative"] = $result['relative_dates'][$entityName]; } else { - $result[$id] = date($dateFormat, strtotime($value)); + $result[$id] = $value; $result["{$entityName}_date_relative"] = 0; } } -- 2.25.1