You say all the properties in capital letters need to be replaced, I can see TIMEZONESTATE_VALUE and VALUE - what are the properties of the message you are passing the function that contain those values? msg.payload.TIMEZONE? or something else?
Thanks for replying. So sorry, but I just noticed I did not paste it the data properly. I wanted to write "timestamp" instead of timezone, and only 1 variable more. I edited my message
So, I need:
TIMESTAMP: a way to add the current time with the timestamp format
STATE_VALUE: I get this value from the previous node, from msg.click, as per my image
You haven't said anything about the required format of the timestamp - I've used Date.now() to get the current time in milliseconds since epoch. If you need a different format, that are countless examples of generating timestamps in JavaScript using the Date object.