From 684d71752064e25143e09666e539b91b3dcd5f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Tue, 21 Feb 2023 11:27:15 +0100 Subject: [PATCH] fix(editor): Fix unexpected date rendering on front-end (#5528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔥 Remove front-end date rendering logic that changes date timezone to workflow TZ --- packages/editor-ui/src/components/RunDataJson.vue | 8 ++------ packages/editor-ui/src/components/RunDataTable.vue | 11 +---------- packages/editor-ui/src/utils/typesUtils.ts | 14 -------------- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/packages/editor-ui/src/components/RunDataJson.vue b/packages/editor-ui/src/components/RunDataJson.vue index 149c2fa063..97f5d365a9 100644 --- a/packages/editor-ui/src/components/RunDataJson.vue +++ b/packages/editor-ui/src/components/RunDataJson.vue @@ -73,7 +73,7 @@ import VueJsonPretty from 'vue-json-pretty'; import { LOCAL_STORAGE_MAPPING_FLAG } from '@/constants'; import { IDataObject, INodeExecutionData } from 'n8n-workflow'; import Draggable from '@/components/Draggable.vue'; -import { parseDate, executionDataToJson, isString, shorten } from '@/utils'; +import { executionDataToJson, isString, shorten } from '@/utils'; import { INodeUi } from '@/Interface'; import { externalHooks } from '@/mixins/externalHooks'; import { mapStores } from 'pinia'; @@ -210,11 +210,7 @@ export default mixins(externalHooks).extend({ }, 1000); // ensure dest data gets set if drop }, getContent(value: unknown): string { - if (isString(value)) { - const parsedDate = parseDate(value, this.workflowsStore.workflow.settings?.timezone); - return parsedDate ? parsedDate.toString() : `"${value}"`; - } - return JSON.stringify(value); + return isString(value) ? `"${value}"` : JSON.stringify(value); }, getListItemName(path: string): string { return path.replace(/^(\["?\d"?]\.?)/g, ''); diff --git a/packages/editor-ui/src/components/RunDataTable.vue b/packages/editor-ui/src/components/RunDataTable.vue index 383e905e19..9f092a7fd7 100644 --- a/packages/editor-ui/src/components/RunDataTable.vue +++ b/packages/editor-ui/src/components/RunDataTable.vue @@ -159,7 +159,7 @@