Rules run exactly one hour too late

Hello all,

I’m using a fresh installation with 2.5.1-2 on my Raspberry after some issues.
From the old installation I took a backup an restored all my Things, Items and Rules.
Everything works perfekt.

The only thing is that I noticed, that all my timebased rules are working exactly one hour to late.
So I have e.g. a rule which should run at 05.00 am to recharge my mobile via a TP-link power plug.
Instaed to run at 5 am the rule started at 6 am.

I have checked the date, and everything looks normal (2020-01-28_08:08:50_CET) or when write a “date” then I get back: Di 28. Jan 08:08:56 CET 2020

Has someone an idea why my rules run now exatcly one hour to late?

In the openhab config setup I have selected Europe, and Berlin, with should be ok.

I also deleted the rule and create a new one via OH NG Rules interface does not fix the problem.

Thanks for your ideas to fix the problem.


1 Like

Java may or may not run with timezone environment variables set, or you might have setup your OS and OH at install time that you explicitly pass java arguments which (wrong) TZ to use.
Why don’t you move to openHABian ? It’s built to avoid hassles like that.


current I’m using Paper UI and HabMin for settings etc.
in booth UI’s, the current date and tim eis shown.
The funny thing is, then I change on the console mode the time e.g. to Helsinki (which is one hour before), in booth UI’s still the “Berlin” time is shown. Heavy !!!


PS: I only want, that my rules are execute at the time in thoose should be.

I had the same problem. The time zone was set to London after a re-install. I changed the time zone in openhabian but it made no difference. It looked okay but rules were all running an hour late.
I found I additionally needed to change it in PaperUI in Configuration/System/Regional settings.


Also in the PaperUI all the values are set right.
Funny thing is, that where every I change something, in the console for the OS itself, still the date and time is shown which I have set via “openhabian-config” setup.


The problem is now solved after a reboot.
But why does OH via PaperUI has an own localisation funktion and is not taken the local information from the OS in my case from Raspberry OS?


It would be very difficult to test multiple regions if they were not configurable.

I used opehabian and it failed to set the correct time zone. No idea why. I fixed it with ssh console command:

sudo dpkg-reconfigure tzdata # Select timezone

Info for others… to check what you have just type at the ssh console prompt


Same code in there. You have to select the option (33), though.

[14:38:45] openhabian@openhabianpi:~$ grep -C 6 tzdata /opt/openhabian/*/*
/opt/openhabian/functions/system.bash-timezone_setting() {
/opt/openhabian/functions/system.bash-  # shellcheck source=/etc/openhabian.conf disable=SC1091
/opt/openhabian/functions/system.bash-  source "$CONFIGFILE"
/opt/openhabian/functions/system.bash-  # shellcheck disable=SC2154
/opt/openhabian/functions/system.bash-  if [ -n "$INTERACTIVE" ]; then
/opt/openhabian/functions/system.bash-    echo -n "$(timestamp) [openHABian] Setting timezone based on user choice... "
/opt/openhabian/functions/system.bash:    dpkg-reconfigure tzdata
/opt/openhabian/functions/system.bash-  elif [ -n "${timezone+x}" ]; then
/opt/openhabian/functions/system.bash-    echo -n "$(timestamp) [openHABian] Setting timezone based on openhabian.conf... "
/opt/openhabian/functions/system.bash-    cond_redirect timedatectl set-timezone "$timezone"
/opt/openhabian/functions/system.bash-  else
/opt/openhabian/functions/system.bash-    echo -n "$(timestamp) [openHABian] Setting timezone based on IP geolocation... "
/opt/openhabian/functions/system.bash-    if ! command -v tzupdate &>/dev/null; then

It was a fresh install with openhabian image. I saw the attempt to set it roll by but I didn’t get an option to do anything. I just saw it failed and the script moved on.

I have a double NAT set up so maybe that’s why it failed. The IP it saw could be the local one not the WAN IP.

option 33… whats that, where, when?

Ever opened sudo openhabian-config?

sure… but that’s after the install is done