The start of the code in question is here
Based on the comment it is supposed to use the following order when setting the timezone.
# tz sources order: 1) /etc/openhabian.conf 2) /etc/timezone 3) default UTC
Do you have a timezone defined in /etc/openhabian.conf? What is in /etc/timezone?
openHABian doesn’t know if this is the first run or an upgrade opr if you’ve changed something so it always runs all parts of the setup. It’s supposed to be idempotent but that’s really hard to do. There is definitely some sort of logic flaw here.
The error is one this line:
tz=$(cat /etc/timezone 2>/dev/null); timezone=${timezone:=$tz}
If I understand that line correctly, the first “line” tries to read /etc/timezone into $tz. The second “line” sets $timezone to the value of $tz but only if it’s not already set.
So either /etc/timezone is set to Europe/Londonor $timezone was set elsewhere in the script already. So where is $timezone set? The only place that variable is set (besides the above line) is in openhabian.conf.
So the comment seems to be correct. The default unmodified openhabian.conf sets $timezone to Europe/London. If timezone doesn’t exist in openhabian.conf /etc/timezone is used.
Part of the logic flaw is "why does openhabian.conf not have the correct timezone in the first place? The instructions for installing openHABian have you edit this file before the first boot (it’s how you set the WiFi and such) so there should never have been a situation where openhabian.conf doesn’t have the correct timezone defined in it.
Maybe some users are installing openHABian without first setting these variables? It doesn’t look like openhabian-conf edits this file later when you use it to change the timezone, but I may have missed that part of the code.
Maybe when openHABian updates itself it also updates openhabian.conf, but if that were the case it would be messing with all sorts of other stuff too, not just the timezone.
So we are back to
. Either you never set the timezone in openhabian.conf, in which case openHABian is doing exactly what you are telling it to do, setting your timezone to what’s in that config file, or we still don’t know why this is happening.
I think maybe a pluarility of users but definitely not a majority of users.