diff --git a/functions/system.bash b/functions/system.bash index 585592da1..cfbdb9e81 100644 --- a/functions/system.bash +++ b/functions/system.bash @@ -100,7 +100,7 @@ timezone_setting() { elif [[ -n $timezone ]]; then echo -n "$(timestamp) [openHABian] Setting timezone based on openhabian.conf... " if ! running_in_docker && ! running_on_github; then - if cond_redirect timedatectl set-timezone "$timezone"; then echo "OK ($(timedatectl | grep zone | cut -d: -f2))"; else echo "FAILED"; return 1; fi + if cond_redirect timedatectl set-timezone "$timezone"; then echo "OK ($timezone)"; else echo "FAILED"; return 1; fi else echo "SKIPPED" fi @@ -114,6 +114,8 @@ timezone_setting() { if ! cond_redirect pip3 install --upgrade tzupdate; then echo "FAILED (update tzupdate)"; return 1; fi if cond_redirect tzupdate; then echo "OK ($(cat /etc/timezone))"; else echo "FAILED"; return 1; fi fi + + sed -ri "s|^(EXTRA_JAVA_OPTS.*interning=true)|\1 -Duser.timezone=${timezone:-Europe/London}|g" /etc/default/openhab } ## Function for setting the locale of the current system.