openHAB 3 time is two hours behind

That’s Ok the co-ordinates I posted are not mine either. :wink:

You can send your alarm clock to OH via the Android app. And that’s what I actually want to do to say OH, for example: "When the alarm goes off, turn on the heating in the bathroom or turn on the coffee machine.
And when I wanted to test that, I noticed in the test item that UTC time is always used and not the current one.
And it doesn’t matter what I set, OH always uses UTC time.

Really strange problem.

Okay, so it’s nothing to do with system clocks and all about parsing data sent from an external source.

Show me.

This looks relevant

That looks interesting and I’ll check that out.

Thank you very much for this link, it helped me a lot and I did a few tests. In fact, the item shows the UTC time, but it doesn’t matter because the alarm clock from the Android device triggers the item.
I have already checked this with a test rule and it already works. But to check whether the correct alarm time is displayed in the sitemap, i first have to find out how to display the date and time in the sitemap. :slight_smile:
If you have a link to that, that would be great.

It gets discussed here, for an example -

There is no easy solution if openHAB don’t first get the correct data with timezone info. What do you actually send from the android? Note that Epoch time is by definition in UTC and carries no timezone info.

I tested the following: set the alarm clock on the mobile phone, the item in OH gets the time … but in UTC. No matter. Cell phone removed from WiFi, waited for the alarm to go off. Nothing happens in OH. Cell phone put back into WiFi, alarm clock set, cell phone left in WiFi, waited until the alarm goes on, the item is triggered. Theoretically, the item could also say “Hello World”, the content doesn’t matter because it only functions as a trigger channel.

That doesn’t explain why the UTC time is displayed in the item, but that obviously doesn’t matter.

Now I have to find out how to display a “datetime” item in a sitemap so that I can check which date and time is displayed there.

Because it all depends what you sent to the Item from the android.

In theory, you can also configure the item as a switch, which then simply switches as soon as the alarm goes off. But you have to know that first because it is not documented anywhere.
Of course, it is better to have the date and alarm time displayed. But I can’t find anything how to format the “datetime” item and then display it as text in the sitemap. I’m just about to go crazy. I want to do this through the OH3 GUI.

Are you following any kind of document? It is not possible to guess what you are doing at all from info supplied in this thread.

It’s all okay now. You have already given me the correct solution in one of your links. The user had the same problem and then also noticed that the UTC time is in the item and that the “correct” local wake-up time is displayed when the time is displayed in the sitemap. I have now also figured out how to format the date and time so that the sitemap shows them. Everything solved.

Just a remark: I have had the same problem.
Install the NTP binding and do not forget again to fill in the time zone in the bottom line of the binding window.
This helped me with the problem

1 Like