Skip to content

Commit

Permalink
fix(Wise Node): Use ISO formatting for timestamps (#10288)
Browse files Browse the repository at this point in the history
  • Loading branch information
mocanew authored and riascho committed Feb 5, 2025
1 parent 3289ff2 commit ca18a25
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/nodes-base/nodes/Wise/Wise.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class Wise implements INodeType {
qs.to = moment.tz(range.rangeProperties.to, timezone).utc().format();
} else if (time === undefined) {
qs.from = moment().subtract(1, 'months').utc().format();
qs.to = moment().format();
qs.to = moment().utc().format();
}

responseData = await wiseApiRequest.call(this, 'GET', 'v1/rates', {}, qs);
Expand Down Expand Up @@ -510,11 +510,17 @@ export class Wise implements INodeType {
});

if (filters.range !== undefined) {
qs.createdDateStart = moment(filters.range.rangeProperties.createdDateStart).format();
qs.createdDateEnd = moment(filters.range.rangeProperties.createdDateEnd).format();
qs.createdDateStart = moment
.tz(filters.range.rangeProperties.createdDateStart, timezone)
.utc()
.format();
qs.createdDateEnd = moment
.tz(filters.range.rangeProperties.createdDateEnd, timezone)
.utc()
.format();
} else {
qs.createdDateStart = moment().subtract(1, 'months').format();
qs.createdDateEnd = moment().format();
qs.createdDateStart = moment().subtract(1, 'months').utc().format();
qs.createdDateEnd = moment().utc().format();
}

const returnAll = this.getNodeParameter('returnAll', i);
Expand Down

0 comments on commit ca18a25

Please sign in to comment.