fix(editor): Fix unexpected date rendering on front-end (#5528)

🔥 Remove front-end date rendering logic that changes date timezone to workflow TZ
This commit is contained in:
Milorad FIlipović
2023-02-21 11:27:15 +01:00
committed by GitHub
parent 510855d958
commit 684d717520
3 changed files with 3 additions and 30 deletions

View File

@@ -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, '');