Wrong timezone in Node Red

I run Node-RED (V4.1.0) under Synology Container. My issue is that I have in my Node-RED GUI always the UTC (Zulu) Timezone instead of Europe/Berlin (GMT+2). I broke yesterday my fingers to correct it and thought I did it, but this morning again ... wrong time stamp. Here is what I already did:

  • I configured my container with the right time zone, as well the time zone
  • I entered a piece of code into my settings.js
  • On top of it I set a Global Environment Variables entry

The Global Environment Variables entry gave me yesterday the correct time stamp in Node-RED. Unfortunately this morning, again, I get the wrong one.

Does anyone has an idea how to fix this issue? Thanks a lot!

Why do you think it is wrong?

The time string in your debug output is Zulu and is 2 hours before the time stamp of your browser just above.

The debug output is actually a number but it is formatted in UTC/Zulu. If you click the time stamp it will toggle through number, local time stamp format, UTC format.

Note that 04:19 UTC is the same time as 06:19 Europe/Berlin. What you are seeing is the same time formatted differently for display.

And just to expand slightly on this, JavaScript's default when serialising a JavaScript Date object is to turn it into an ISO8602 date string which is always UTC (the trailing Z fpr Zulu/UTC/GMT).

This can indeed be very confusing for the unwary.

First of all thank you ... this is what I did't know. I never toogled the timestamp. Good to know!

Yesterday I made other test within nodes that did not fit in my timezone, made the entry in the settings and wondered this morning.

But the jobs ran on time :smiley: again thanks!

1 Like