From 46d013cbc524cd938b368fd0247ad6537ffb275d Mon Sep 17 00:00:00 2001 From: agobrech <45268029+agobrech@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:55:40 +0100 Subject: [PATCH] test(Date & Time Node): Skip the test when local timezone is not in UTC (no-changelog) (#5735) Check for moment default timezone in dateTime tests --- packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts b/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts index e9b3cbbbdb798..98c2b2f1f51cb 100644 --- a/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts +++ b/packages/nodes-base/nodes/DateTime/test/node/DateTime.test.ts @@ -1,9 +1,10 @@ +import moment from 'moment'; import { testWorkflows, getWorkflowFilenames } from '../../../../test/nodes/Helpers'; const workflows = getWorkflowFilenames(__dirname); // ! When making changes to the Workflow test files make sure to export env TZ=UTC as Github Actions runs in UTC timezone -if (new Date().getTimezoneOffset() === 0) { +if (new Date().getTimezoneOffset() === 0 || moment().utcOffset() === 0) { describe('Test DateTime Node', () => testWorkflows(workflows)); } else { describe('Test DateTime Node', () => {