Rule cron wrong date

Hi, i updated from an very early version of openHab2 to the current version. I currently have a mixed setup of V1 and V2 plugins because i am not able to migrate all my config currently.

Now i have an issue with the my rules with cron trigger.

I used the NTP plugin to get the current date and time. This is completely configured in V2 plugin of NTP:
ntp:ntp:demo [ hostname=“”, refreshInterval=60, refreshNtp=30, timeZone=“Europe/Berlin”, locale=“de” ]
DateTime Date2 “Date2 [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]” (gEG) { channel=“ntp:ntp:demo:dateTime”, knx=“11.001:0/1/0, 10.001:0/1/1” }

Text item=Date2

The KNX - Bus show the correct date and time and also in the PaperUI -> Control overview the date is correct. But in my sitemap where the value will be shown is the wrong value. There is a shift by 1h.
PaperUi - Control: 16:00
GUI: 15:00

And the GUI time will also be used in the rule for the cron timer.

If i change it to the wrong timezone, the time of the KNX devices will be wrong. Does someone have an idea what will be the problem?

Thank you for your help.

All that the NTP plug in has ever done is to query an NTP service for the current time and put that time into an Item. It will not synchronize the time of your operating system to match that value and openHAB gets and uses the operating systems time for all of it’s time based operations (timestamps on longs, scheduling timers and cron triggers, etc).

I suspect the timezone is probably set incorrectly on your operating system. I cannot explain why the KNX shows the correct time. Perhaps KNX maintains it’s own clock.

Hi, thank you very much. You are absolutely right. I started OH in a docker container and the systemdate of the the container was right. But the /etc/timezone was not created.

After adding the /etc/timezone file on the docker container base on the host system, openhab shows the correct time everywhere.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.