}
$dbName = $value['name'];
+ $type = CRM_Utils_Type::typeToString($value['type']);
$newObject->$dbName = $object->$dbName;
if (isset($fieldsToPrefix[$dbName])) {
$newObject->$dbName = $fieldsToPrefix[$dbName] . $newObject->$dbName;
$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);
}