question

jonoci avatar image
jonoci asked

Cerbo and Node-Red time zones not consistent - how to set correct timezones

Timer flows require to be set up in UTC time, not local time, else they do not trigger at the correct time. My time zone is GMT+2 ( Africa, Namibia). I set the Date/Time on cerbo console Date & Time page to Namibia Standard Time (UTC+2) . The data&time on said page shows correct local date/time then. In my node red flows I use node-contrib-timer which allows setting of multiple on/off time schedules per day, etc - there is no local/UTC time setting selection in the node - it uses the node red time as its time reference. In all cases I now have to set the timer to local time -2hours and then the timer triggers on the 'correct' local time - eg, set to come on @ 08H00 and it comes on at 10H00 local time. Changing the Cerbo date & Time to UTC time makes no difference.

ssh into cerbo root and 'date' returns 'day month date time UTC 2024'

with 'day month date' correct, time is in UTC, NOT local, and indicates UTC on same line.


The timer ( and cerbo and all flows) worked for the last 2 years, and now...

I am reluctant to use the manual symbolic link method to change the time zone - I don't know what else may be affected.

Any Advice please...

Joe

Node-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
jonoci avatar image
jonoci answered ·

Answering myself....

Not clear and not indicated in any document, but you must reboot the cerbo after setting data & time to non-UTC timezone for node red to use the new set time zone...

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xsilvergs avatar image
xsilvergs answered ·

I use openweathermap in N-R, one piece of data is "timezone_offset". Our setup is in a camper and moving from country to country in Europe always gave me a headache. Perhaps this could work for you.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.