From d9aa678ce3590970683cf0c4179fb519d6cf8db0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 4 Sep 2020 11:06:25 -0600 Subject: [PATCH] ImportExport: Fix date-time customfields with custom format were not exported correctly see 74bd66d857d040b0b2f5ab11361fef409eec5079 --- importexport/inc/class.importexport_export_csv.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/importexport/inc/class.importexport_export_csv.inc.php b/importexport/inc/class.importexport_export_csv.inc.php index 085139d334..6c67cc8563 100644 --- a/importexport/inc/class.importexport_export_csv.inc.php +++ b/importexport/inc/class.importexport_export_csv.inc.php @@ -245,7 +245,8 @@ class importexport_export_csv implements importexport_iface_export_record $name = '#' . $name; switch($c_field['type']) { case 'date': - $fields['date'][] = $name; + case 'date-time': + $fields[$c_field['type']][] = $name; if ($c_field['values']['format'] && (is_array($record) ? $record[$name] : $record->$name)) { // Date has custom format. Convert so it's standard. @@ -265,9 +266,6 @@ class importexport_export_csv implements importexport_iface_export_record } } break; - case 'date-time': - $fields['date-time'][] = $name; - break; case 'select-account': $fields['select-account'][] = $name; break;