openHAB 3 time is two hours behind

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?

Kind regards

Check your Java locale/timezone

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.

I have had the same problem with wrong time in logs.
I enabled the NTP via openhabian-config and everything was fine.
Maybe this helps you, too.

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.

Have you checked in the MAIN UI in settings → regional settings that te time zone is set correctly?

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.

Login to the karaf console and execute

env |grep user.timezone

which timezone is shown there ?


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

Obviously you will have to change the above for your timezone etc.
Reboot server.

Is there a “save” button?

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 ?

Everything is set correctly, I just checked it again.

These are the settings for the time zone in OH. I have already set another one for testing, but the result remains the same. OH only takes UTC time.

Do you also have the latitude and longitude set as well?

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.

That’s CEST, Central European Summertime, correct for Berlin.

This is the part you need to tell us more about.

Are you sending this time and telling openHAB it is CEST? How does it get processed, is there any reason for openHAB not to assume it is UTC?

1 Like

Everything in the log is correct and the time is right.

The location is also right, but I will certainly not post it on the Internet. :wink: