I have a serious problem with the info I`m reading of my weather API.
I get info into a function node that exports the sunset and sunrise times, now the problem is that it gives me the info in a weird way.
EG. Object:
sunrise: 1572060152
sunset: 1572106754
now if I click on the number it changes to a HEX. And if I click on it again it changes to something else, not sure what u call it but it looks like this "2019-10-26T03:22:32.000Z" And then if I click it again I get the info that I require 10/26/2019, 5:32:32 AM [UTC+2]
I need to get the time extracted from that info but it doesn't matter what I try the outcome is always the 10 digit number...
That looks like UNIX (or Epoch) time. When you click on it in the debug panel, NR changes it to a more readable format for you (those developers are pretty cool!)
You could feed that into the moment node (node-red-contrib-moment and it willl handle it for you.
alternative as you are already using a function node you can multiply the unixtimestamp by 1000 to get a javascript timestamp and then use the javascript date commands
But it is in the wrong timezone...
it is in UTC if I read correctly on the page that you said i must visit.
But I can't seem to set the timezone to UTC+2.