From 7cad3e54b75a81aa6874d7fda484e8bff491a44a Mon Sep 17 00:00:00 2001 From: CiviCRM Date: Tue, 9 Sep 2014 18:59:59 +0530 Subject: [PATCH] CRM-15219: fixed import of activity date --- CRM/Activity/Import/Parser/Activity.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Activity/Import/Parser/Activity.php b/CRM/Activity/Import/Parser/Activity.php index de2a913564..1d5a7d6e0a 100644 --- a/CRM/Activity/Import/Parser/Activity.php +++ b/CRM/Activity/Import/Parser/Activity.php @@ -265,7 +265,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { foreach ($params as $key => $val) { if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($key)) { - if ($key == 'activity_date_time' && $val) { + if ($val) { $params[$key] = CRM_Utils_Date::formatDate($val, $dateType); } elseif ($customFields[$customFieldID]['data_type'] == 'Date') { @@ -275,6 +275,9 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { $params[$key] = CRM_Utils_String::strtoboolstr($val); } } + elseif ($key == 'activity_date_time') { + $params[$key] = CRM_Utils_Date::formatDate($val, $dateType); + } elseif ($key == 'activity_subject') { $params['subject'] = $val; } -- 2.25.1