mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Set correct timezone in luxon (#3115)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
/* eslint-disable no-prototype-builtins */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
|
||||
import { DateTime, Duration, Interval } from 'luxon';
|
||||
import { DateTime, Duration, Interval, Settings } from 'luxon';
|
||||
import * as jmespath from 'jmespath';
|
||||
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
@@ -47,6 +47,10 @@ export class WorkflowDataProxy {
|
||||
|
||||
private additionalKeys: IWorkflowDataProxyAdditionalKeys;
|
||||
|
||||
private defaultTimezone: string;
|
||||
|
||||
private timezone: string;
|
||||
|
||||
constructor(
|
||||
workflow: Workflow,
|
||||
runExecutionData: IRunExecutionData | null,
|
||||
@@ -56,6 +60,7 @@ export class WorkflowDataProxy {
|
||||
connectionInputData: INodeExecutionData[],
|
||||
siblingParameters: INodeParameters,
|
||||
mode: WorkflowExecuteMode,
|
||||
defaultTimezone: string,
|
||||
additionalKeys: IWorkflowDataProxyAdditionalKeys,
|
||||
defaultReturnRunIndex = -1,
|
||||
selfData = {},
|
||||
@@ -69,8 +74,12 @@ export class WorkflowDataProxy {
|
||||
this.connectionInputData = connectionInputData;
|
||||
this.siblingParameters = siblingParameters;
|
||||
this.mode = mode;
|
||||
this.defaultTimezone = defaultTimezone;
|
||||
this.timezone = (this.workflow.settings.timezone as string) || this.defaultTimezone;
|
||||
this.selfData = selfData;
|
||||
this.additionalKeys = additionalKeys;
|
||||
|
||||
Settings.defaultZone = this.timezone;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,6 +200,7 @@ export class WorkflowDataProxy {
|
||||
that.activeNodeName,
|
||||
that.connectionInputData,
|
||||
that.mode,
|
||||
that.timezone,
|
||||
that.additionalKeys,
|
||||
);
|
||||
}
|
||||
@@ -633,6 +643,7 @@ export class WorkflowDataProxy {
|
||||
that.activeNodeName,
|
||||
that.connectionInputData,
|
||||
that.mode,
|
||||
that.timezone,
|
||||
that.additionalKeys,
|
||||
);
|
||||
},
|
||||
@@ -647,6 +658,7 @@ export class WorkflowDataProxy {
|
||||
this.connectionInputData,
|
||||
that.siblingParameters,
|
||||
that.mode,
|
||||
that.defaultTimezone,
|
||||
that.additionalKeys,
|
||||
defaultReturnRunIndex,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user