Local date and time change if I use custom farmat

I found something that I believe is a bug or an error

My timezone is configured as follows:
GENERIC_TIMEZONE=America/Manaus

Come on, in the date/time node, when I use the expression: {{new Date().toLocaleString()}}
It brings the local date and time correctly, but when I treat this time using the: custom format, it changes my time zone.
Note: This only happens when I use the custom format.

How do I prevent this change from happening?

I had this problem as well I think as a workaround you can jam your date / time expression into a Set node and then pass it to the Date & Time node to format it and it should output correctly

2 Likes

Hi, Joel.

I tried the way you said, but the set node is returning the same date time problem on the output.

Where is the Date node? You have to pass the output of the Set node into your Date node.

Alternatively, I recommend you use a Luxon expression because then you can cut it down to a single Set node as you have here.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.