Issue of the topic: please be detailed explaining your issue
Please post configurations (if applicable):
Items configuration related to the issue
Sitemap configuration related to the issue
Rules code related to the issue
Services configuration related to the issue
If logs where generated please post these here using code fences
Hi. I created a new installation of openhabian 5.0.1 and copied my configuration over from 4.3. However, I noticed time based rules are not running at their scheduled time. For example:
This did not run at all at 1p.m.. The same is true for my CRON jobs which I normally use cron as it’s easier to configure. What I check raspi-config, I see US and Central time configured properly. My time stamps in the Log Viewer match the current time as well. What can I check or look for to see what might be misconfigured?
Nowhere above talks about /etc/localtime. Why are you trying to open that file?
There are only two files you need to look at and one seeing in MainUI: /etc/timezone, /etc/default/openhab.
You must have root to edit these files. I don’t know how to do that in filezilla. It should ask for your password. From the command line you’d use sudo before the command to open the file for editing.
Thanks. I am not very good at software. I did find another thread that directed me to use SSH and update Duser time zone. That seems to have worked. Thanks again for all your help.
I can confirm this problem for openHAB 5.1.0 - Release Build. Time in Logs was one hour behind what “date” showed, and time based rules fired one hour too late. In my case, /etc/timezone was Europe/London. I used timedatectl to correct it to Europe/Berlin, now everything works as expected.
I can tell you that the problem is solved and had, in my case, nothing to do with Openhab. There were no errors in the log to be found. The fundamental problem was in my Linux-server and the NTP-service. After repairing that, the time issues were solved and all is working fine now.
Don’t know it’s the right thread but let me address my issues.
Can you share a link to this issue?
I ran OH since 2020 and now I setup a completely new installation (OH5.x) without any legacy.
Installed on raspi via Raspberry Pi Imager. Everything smoothe but after some time I recognized
logs
cron
and persistence (rrd4j & jdbc)
are showing diffrent timestamps!
Main UI - Regional Settings - Europe/Berlin - doesn’t help
changing /etc/timezone via linux commands - doesn’t help
changing /etc/default/openhab will help till the next update!
It will be overridden!
Coming to the point:
I don’t want to maintain extra linux parameters in a self maintained file just to have my configured timezone ready all over the place!
But I’m still curious regarding the problem. Is it well known that after OH setup you need to edit some /etc/whatever files, restart again and after that you regional settings are fine?
You’re in the US so if you’re setting up a new system from scratch do you also have default timezone Europe/London?
It’s fairly well known. I can’t say how well, but there are many threads discussing it including the release discussion threads.
I run in Docker which doesn’t have this problem. There is no /etc/default/openhab file in the Docker container. It’s a “manual” install inside the container, not apt or yum or openHABian. To set the EXTRA_JAVA_OPS one passes that as an environment variable, which I do every time I start/create a container.