From fd6e7449a95f9608ee764f44fac72a301fd1c838 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 5 May 2023 17:40:35 +0800 Subject: [PATCH] fix(nc-gui): handle copy n paste datetime for ext db --- packages/nc-gui/composables/useMultiSelect/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index cae4768011..0aa9f2fbeb 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -117,10 +117,14 @@ export function useMultiSelect( } if (columnObj.uidt === UITypes.DateTime) { - if (isMssql(meta.value?.base_id)) { - textToCopy = dayjs(textToCopy).format(constructDateTimeFormat(columnObj)) + if (isXcdbBase(meta.value?.base_id)) { + if (isMssql(meta.value?.base_id)) { + textToCopy = dayjs(textToCopy).format(constructDateTimeFormat(columnObj)) + } else { + textToCopy = dayjs(textToCopy).utc(true).local().format(constructDateTimeFormat(columnObj)) + } } else { - textToCopy = dayjs(textToCopy).utc(true).local().format(constructDateTimeFormat(columnObj)) + textToCopy = dayjs(textToCopy).format(constructDateTimeFormat(columnObj)) } if (!dayjs(textToCopy).isValid()) {