Openhab 4.3.0 timezone forced to Europe/Berlin for frontail and cron/Astro rules

  • Platform information:
    • Hardware: RPi5/8GB/32Gb,128Gb NVME m.2
    • Openhabian
    • Java Runtime Environment: JDK 17
    • openHAB version: 4.3.0
  • Issue of the topic: unable to force Java timezone from Europe/Berlin

Hello, I wanted to share I experienced an issue with the recent 64bit stable release of Openhabian. The frontail timestamps were off by ~9 hours and my cron jobs and Astro items were way off. Despite changing the timezone in the config and in openhab settings the timezone would always revert to Europe/Berlin upon reboot. This was frustrating because the local time would be correct for my area but the UTC time would be for Berlin. I found that in the file /etc/default/openhab there is a line for ‘EXTRA_JAVA_OPTS’ (Line# 34) that forces the timezone to ‘Europe/Berlin’ for -Duser.timezone. I had to edit this line of code and rename the timezone to my own (US/Pacific). After saving the file and rebooting the frontail log timestamps and the cron/Astro rules ran at the correct time. I am a still learning so apologies if I am not saying this all correctly.

Thanks for sharing your experience. Did you install this fresh from scratch, or was it an upgrade?

Did you try to change it in openHABian-config? Menu 30 System Settings → 33 Set timezone. I think that is supposed to hande both the OS and the Java command line argument. If that failed an issue definitely needs to be filed.

HelIo, I switched to version 4.3 on my Raspi4 4Gb of memory two days ago.
When I looked up the entries in the schedule section of the UI, I discovered that the times were displayed in UTC. Fortunately the actions configured started as expected at CET times. I edited the appropriate entry in EXTRA_JAVA_OPTS. After reboot the parameter was part of the java runtime environment, but schedule times were still shown in UTC.
Up to the last milestone build everything worked as expected.
Hope this helps, Wolfgang

Hello. Fresh install. I tried changing the time zone in the openhabian config. Rebooted. Local time was correct to my area but the frontail logs and the rules engine kept running off the UTC time which was stubbornly sticking to Berlin time. I tried menu 30 of the openhabian-configuration. What was odd was all indications suggested the pi had the correct local time and zone. It was only the rules and log timestamps affected. I wiped and reimaged a second time using the raspberry imager with same results. During the initial install one of the bash commands indicated Java opts time zone changed to DUser Europe/Berlin during the Java install. I just happened to catch it. I don’t know enough about it yet to know why the openhabian config file doesnt rewrite the config file to remove or edit line 34 when I changed time zone via sudo openhabian-config. Rebooting doesn’t help. Only manually editing the config file helped. Sorry I wish I could be more helpful. Thank you guys. I love this software :slight_smile:

Hello all,
I updated to the newest version. Everything in the schedule is okay now.
Thanks to the develeper(s)
Wolfgang