Hello,
I have a problem with the time in openHAB that I don’t understand.
The system time of the Raspi is correct.
But not the time of the openHAB installation.
openHAB is two hours behind … but why?
All regional settings are set correctly.
It struck me when I wanted to send my wake-up time to openHAB and the time was always two hours behind.
Does anyone have any idea what’s going on or is that a bug?
Thanks for your quick answer, but I don’t think that really helps me. It’s about Docker. I had already read the thread. I installed OH through the repository and Zulu Java according to instructions.
Unfortunately, I have absolutely no idea about Java because I’m not a developer.
Hello Dirk,
i have no openhabian config, i installed OH over the repository.
But I have now found out that OH uses UTC time and not the local. But that cannot be changed. Just looks like a bug to me.
I don’t know what i can do to fix the time.
I can set any time zone but OH always uses UTC.
In OH 2.5 there was a possibility to edit the NTP server in the network settings in OH 3 but this option is no longer available.
Yes, I already set that during setup, but OH3 just doesn’t care about the time zone.
It doesn’t matter which time zone I set … OH always uses UTC time.
When I build a server I run these commands to double check the time is correct before I install OH:
echo Change the time zone
dpkg-reconfigure tzdata
echo Change locale to Australia
dpkg-reconfigure locales
update-locale en_AU.UTF-8
locale-gen en_AU.UTF-8
echo the local is set to
locale
Obviously you will have to change the above for your timezone etc.
Reboot server.
You did not explicitly mention the timezone that you would like to have.
From one of the screenshots in your first post and the screenshot that contains the timezone that is set in the openhab environment my conclusion is that the timezone you want is MEST/CEST ( e.g. Europe/Berlin ). You stated that the timezone of the OS is correct.
So for the moment that looks like everything could be configured right that leads me to the question what does the second and third screenshot in your first post contain ? Could it be that the formatting for these items just is missing ?
When openhab starts does the /var/log/openhab/openhab.log look similar to below?
2021-06-06 11:31:55.896 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Australia/Sydney’.
2021-06-06 11:31:55.951 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to ‘-36.553225183712215,152.3733062744141’.
2021-06-06 11:31:55.952 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to ‘en_AU’.
Hello Wolfgang,
the first screenshot is the time zone of the raspi. I want Berlin time zone.
The second screenshot is the time stamp of OH 3. You can find it by clicking on “About & Help”, then on “Technical information”, then on “Show details”. Scroll all the way down and the time stamp is there.
The third screenshot is from my “test alarm clock” item. I wanted to send my alarm time to OH and then I noticed that the alarm clock would “ring” 2 hours earlier than it should. I’ve tested it on different devices and the result is always the same. For example, I set the alarm clock for 10 o’clock, OH says the alarm clock will go off at 8 o’clock.