I'm using "Inject" node with payload: timestamp, connected to a "debug" node(attachment).
I've just found there are four different values of the timestamp when you click on the payload in the debug section.
Is there any way to access these four values by using a function or something else?
The values are the same, only the way they are displayed changes when clicking on them.
So accessing the values with a function node will give the same result
The values 2( 13:35 ) and 3( 3:35 PM) are different - 2 hours difference. Value 3 is the local time in Germany and I guess it's coming from the raspberry. Currently I'm using "moment node", but I had a problem after switching to summer time - manually change the adjustment of the hours. So to avoid that change every summer and winter I'm looking for another solution and this thing with the timestamp looks good if I can access it.
I'm using an inject node with timestamp and moment node to display current date and time and it was working good until the change of the time from CET(Central European Time) to CEST (Central European Summer Time). After that change I had to increase with 1 hour the moment node to display the correct time. So when switching back from CEST to CET I have to decrease with 1 hour and like that twice in a year Not a big deal, but... it could be automatically I guess.
As Steve says, if you make sure the node red machine is setup with your time zone then all you have to do is to get node-red to display the timestamp in local time and it will do it for you.
Thank you guys, problem solved. I deleted the input and output timezone specifiers and the node determined automatically a new one from the system. Now it works perfectly