-
-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Summary
UTC is used instead of local timezone with ARM64 Docker image for openHAB 5.1.2. This effects trigger times for rules and comparisons with items like Daylight Start Time from Astro Sun Data. This does not happen with the Docker image for 5.1.1. This results in scripts running 16 hours late here in the America/Los_Angeles timezone. (I don't know if this does not happen in 5.1.2 without Docker.)
Expected Behavior
The correct timezone should be used.
Current Behavior
The UTC timezone is used. However...
dhwalker@rpi4b> docker exec d4df49409fdc date
Wed Feb 11 10:28:55 AM PST 2026
dhwalker@rpi4b> docker exec d4df49409fdc more /etc/timezone
::::::::::::::
/etc/timezone
::::::::::::::
America/Los_Angeles
Also, Blockly's "now" block returns "2026-02-11T09:57:00.347-08:00[America/Los_Angeles]"
Possible Solution
(Sorry...)
Steps to Reproduce
- Create the following Blockly rule, changing the "When" time to a minute or two in the future:
- Watch the log. The rule will not run until the specified time UTC, rather than the local timezone.
Context
I want to invoke rules at specific times and times relative to sunrise/sunset. Retreating to the Docker image for 5.1.1 has resolved the issue.
Your Environment
OpenSUSE does not create /etc/timezone automatically, so I create it with "timedatectl show --property=Timezone --value > /etc/timezone".
Image
- openHAB version: 5.1.2
- Image tag used: latest
Docker Host
- Operating System: openSUSE Tumbleweed (20260202)
- Docker Version: 28.5.1-ce, build f8215cc26
- Kernel Version: 6.18.8-1-default
- Architecture: aarch64
Configuration
I start openHAB with systemd:
[Unit]
Description=openHAB
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStartPre=bash -c 'timedatectl show --property=Timezone --value > /etc/timezone'
ExecStart=/usr/bin/docker run --name=%n --net=host --pull=never --rm \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-v /opt/openhab/addons:/openhab/addons \
-v /opt/openhab/.java:/openhab/.java \
--device=/dev/ttyACM0 \
-e USER_ID=454 \
-e GROUP_ID=460 \
-e CRYPTO_POLICY=unlimited \
-l diun.enable=true \
-l diun.watch_repo=false \
openhab/openhab:latest
ExecStop=/usr/bin/docker stop -t 2 %n
#ExecStop=/usr/bin/docker stop -t 2 %n ; /usr/bin/docker rm -f %n
# Restart the openhab process if it exits prematurely.
Restart=on-failure
RestartSec=20
StartLimitBurst=5
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target