From 5e96acc1e2c170caaf3d3dd26a7358ddea2ef669 Mon Sep 17 00:00:00 2001
From: "kaushik.p" <kaushik.p@vtigersolutions.com>
Date: Thu, 11 Jan 2024 18:01:20 +0530
Subject: [PATCH] #Fixes::157770582::kaushik::Custom field time format not
 displayed as per time format in data sent

---
 modules/Vtiger/actions/ExportData.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/Vtiger/actions/ExportData.php b/modules/Vtiger/actions/ExportData.php
index ef3a7fc83..454b0d234 100644
--- a/modules/Vtiger/actions/ExportData.php
+++ b/modules/Vtiger/actions/ExportData.php
@@ -348,7 +348,13 @@ class Vtiger_ExportData_Action extends Vtiger_Mass_Action {
 				if ($value && $value != '0000-00-00') {
 					$value = DateTimeField::convertToUserFormat($value);
 				}
-			} elseif($type == 'datetime') {
+			} /**
+			*  Handled Conversion of time as per custom field time format in exported file
+			*/
+			elseif($uitype == 14) {
+			   $timeUIObj = new Vtiger_Time_UIType();
+			   $value = $timeUIObj->getDisplayValue($value);
+		   }elseif($type == 'datetime') {
 				if ($moduleName == 'Calendar' && in_array($fieldName, array('date_start', 'due_date'))) {
 					$timeField = 'time_start';
 					if ($fieldName === 'due_date') {
-- 
GitLab