I found out that my OH3 has an delay of 30minutes in all Timestamps like network:ping last seen, in graphs created from values of Modbus (Smartmeter, frequency, Power, U,I) but it shows the correct ntp-time. The Result is that frequency and Powercharts are everytime shown half an hour behind the real local time and it seems OH-internal Timestamps (rrd-recordings) did the same. I checked the regional and ephemerial settings in the UI but i can’t find a misconfigured point.
I need Help to find the point where this could be wrong sat up.
Sorry, Did not write often in english (Germany) and the editor here is much slower as OH on my old Netbook there.
If it’s a timezone issue you need to verify you have the timezone set correctly in three places.
The operating system (i.e. /etc/localtime will be linked to a file in /user/share/zoneinfo corresponding to your timezone. Depending on the version of the OS you likely also have a text file /etc/timezone with the timezone defined. What ever way you check and set the timezone for Lubuntu needs to be done.
/etc/default/openhab will sometimes pass the timezone to Java in the EXTRA_JAVA_OPT field.
Regional settings in MainUI.
If it’s not a timezone issue A lot of development has happened on OH in the 2.5+ years since 3.4 was released.
But in /etc/default/openhab the EXTRA_JAVA_OPT was empty.
With
EXTRA_JAVA_OPTS=“-Duser.timezone=Europe/Berlin”
and a clean reboot the timestamps seems to fit reality. A reload of openhab alone did not worked here.
But: why just 30minutes only. This is Europe with GMT+1 and with DST it is GMT+2. And not GMT+0,5 or so. I cant see what time-setting OH3 was using there before i fixed the above.
I checked the regional settings before and after the fix. They are equal! Just an hypothetical question. ?
I have an rpi4 with OH4 installed and want to migrate to it. But it will take some time and the old one must be active since i’m finished.
There do exist half hour timezones in the world so it is possible to do so. Timezone settings can be defined using hours +/- GMT and they accept minutes. But who knows what happened here.
Unfortunately the regional settings only have limited impact to the times used by OH. Time based triggers, logging timestamps, persistence, etc all use the timezone from the JVM (i.e. the JAVA_EXTRA_OPTS value).
Note that the NTP binding only puts a timestamp in an Item. It does not control the OH system clock at all.
May as well jump to 5.1. It would be about the same amount of work.