From a1305c92eaa4708953e68f623ba0fd47129de972 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Wed, 9 Jul 2014 15:53:18 +0530 Subject: [PATCH] CRM-14956 - Copying Event Price Set Fails If Any Price Has Active Date https://issues.civicrm.org/jira/browse/CRM-14956 --- CRM/Core/DAO.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index ea88f50dc8..001f66b945 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1165,6 +1165,7 @@ FROM civicrm_domain } $dbName = $value['name']; + $type = CRM_Utils_Type::typeToString($value['type']); $newObject->$dbName = $object->$dbName; if (isset($fieldsToPrefix[$dbName])) { $newObject->$dbName = $fieldsToPrefix[$dbName] . $newObject->$dbName; @@ -1176,9 +1177,7 @@ FROM civicrm_domain $newObject->$dbName = $fieldsToReplace[$dbName]; } - if (substr($name, -5) == '_date' || - substr($name, -10) == '_date_time' - ) { + if ($type == 'Timestamp') { $newObject->$dbName = CRM_Utils_Date::isoToMysql($newObject->$dbName); } -- 2.25.1