Multi date issues

Hi team,

I have a bit of a problem with what seems to be timezones and dates transformation on multiple steps.

I am trying to pull the table from excel into the Postgres. Here is my workflow:

I am experiencing 2 problems:

  1. date delay on 2 steps (Step 4 and Step5)
  2. Transformation failure unless I manually trigger it (Step 4)

Step 1: I pull the xlsx file from the disk
Step 2: Transform it into JSON
Step 3: My date from excel comes as serial date (Instead of 2021/01/30 it is 44226) and with formula {{new Date(Math.round($json[“Date”] - 25569) * 86400 * 1000)}} I transofrm it into 2021-01-30T00:00:00.000Z
Step 4: I remap all the fields in the desired order and only change date from 2021-01-30T00:00:00.000Z to 2021/01/30 using formula {{DateTime.fromISO($json[“Date”]).toFormat(‘y/LL/dd’)}}
The problem is that when I trigger this step manually it works but when the entire workflow runs it gives an invalid date result which breaks the workflow. Triggering it manually within the node works again with no issues.
Step 5: This one simply takes the previous and uploads it into Postgres table. In Postgres the date now appears as 2021/01/29 - one day delay. In the node date from previous node (2021/01/30) outputs to 2021-01-29T13:00:00.000Z. I want it to remain the same =2021/01/30

Information on your n8n setup

  • n8n version:1.71.3
  • Database:Postgres
  • Running n8n via:lxc

Hi,

Not saying this might be the problem, but any reason why you are still on 1.71.x?

Might be a good idea to upgrade to a newer version before starting to troubleshoot.

Reg,
J.

1 Like

Youre right.
I updated to 1.86.1.
The problems are still present but now we have taken this factor out of the equation.
Thank you for reminding me :slight_smile: