Hi, the TimezoneOffset ist -60, which seems to be correct for Germany.
But if I want to use a timestamp like
var currentDate = new Date();
I always get the UTC-Time. And if I then want to continue using it, I always have a difference of one hour to the current local time.
I'm still a newbie to working with nodered and programming stuff like this, but I thought if I asked for the actual time, I would get the current local time. - Thanks for help!
Hi, thanks for the quick response. For various events I have set up context variables that contain an entry in conjunction with a timestamp: E.g. last change in temperature, in conjunction with a timestamp.
If I print the variable with debug as mentioned before, I can see that the temperature changed at 13:56 (UTC+0). But in local time (Germany) the temperature changed at 12:56 (UTC+1).
My assumption was that I would get the local time with "new Date()" and that consequently nodered's time setting should have been incorrect. But now I assume that it is correct that the timestamp always includes UTC+0?
I think I'm fine with this result. I was able to find out that Node-Red is set with the correct timezone, and I understood how the timestamp thing works. Thanks for your help! Best regards - Daniel