From 17a4e2ea80c664e248c136b7e66eef710ccba7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 2 Jan 2024 12:50:31 +0100 Subject: [PATCH] fix(Schedule Trigger Node): Use the correct `moment` import (#8185) Any node that uses `moment.tz` should import from `moment-timezone` instead of `moment`. This fixes #8184 --- packages/nodes-base/nodes/Schedule/GenericFunctions.ts | 2 +- packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Schedule/GenericFunctions.ts b/packages/nodes-base/nodes/Schedule/GenericFunctions.ts index aa607521e3..3e7b37146c 100644 --- a/packages/nodes-base/nodes/Schedule/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Schedule/GenericFunctions.ts @@ -1,5 +1,5 @@ import type { IDataObject } from 'n8n-workflow'; -import moment from 'moment'; +import moment from 'moment-timezone'; import type { IRecurencyRule } from './SchedulerInterface'; export function recurencyCheck( diff --git a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts index 10a9a4ae6e..781d3dcaf6 100644 --- a/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts +++ b/packages/nodes-base/nodes/Schedule/ScheduleTrigger.node.ts @@ -8,7 +8,7 @@ import type { import { NodeOperationError } from 'n8n-workflow'; import { CronJob } from 'cron'; -import moment from 'moment'; +import moment from 'moment-timezone'; import type { IRecurencyRule } from './SchedulerInterface'; import { convertToUnixFormat, recurencyCheck } from './GenericFunctions';