Month shifting with iCalendar node

Hi,

Using the iCalendar node,
I’m experiencing a problem with shifting of the month, by one month less.

Not sure if this is a bug.
I have found this : JavaScript Date getMonth() Method
But my technical skills do not allow me to go further.

Thank you

Hey @alexandre!

Welcome to the community :sparkling_heart:

Can you share some more details? How are you getting the state date and end date? Is this passed from a node prior to the iCalendar node? Can you share your workflow? You can copy the nodes and paste them here (check this out: How can I contribute? | Docs).

If you want to perform operations on Date and Time, you can use the Date & Time node.

Here is my workflow.
Dates are passed from the Strava node.
“Format Start” and “Format End” nodes were set to test another date format but it changes nothing.

Thanks for sharing this. Can you also share the output return by the Strava Trigger node? Please replace any sensitive information that gets returned. I am interested in the dates that are returned

I’m using these 2 parameters :

  • start_date_local
  • elapsed_time to calculate the end time

Hey @alexandre!

Thank you for sharing the output. I took a look at the workflow that you shared. The Add Duration node is adding 3600 seconds (= 1 hour). If you want to add a month change the Time Unit to Months. Below is a workflow that might be helpful

Thanks @harshil1712, it works now.
However, isn’t this a bug of the iCalendar node?

Hey @alexandre,

The iCalendar node doesn’t have a bug. You were adding 3600 seconds (1 hour) to the start time and then passing the value to the iCalendar node. The workflow that I shared, adds a month instead of 3600 seconds and then passes the value to the iCalendar node. Let me know if you need more details :slight_smile:

Fix got released with n8n@0.158.0.

Please make sure to remove the temp-workaround after you update, else it will use the wrong date.