Xiaomi MIUI Alarm Clock sending wrong epoch value

Hello,

I’ve a problem regarding the Alarm feature under Android in the openHAB App. I’m running Android 10 on a Mi MIX3 with the xiaomi.eu beta ROM.

When I’m setting an Alarm in the systems clock app the openHAB App is sending the wrong epoch value to my openHAB server. For example I’ve an alarm for 5:30am everyday. The epoch value send (as of now) is 1579404600000, so exactly one hour early (based on GMT +1). If I set an Alarm for like 11:48am at 11:43am it sends the right epoch value. All the other alarms (which arent in the same hour) are minus one hour off.

I also installed the Google Clock app and tried setting the alarm there. Interestingly enough the right epoch times are send then and everything works fine.
But to be honest I would like to use the system provided alarm app instead of installing something new for that (I mean it should work…).

Is someone facing the same problem and has a solution to it? Or can someone verify the problem with their Xiaomi device?

The openHAB app just sends the next alarm clock, that is provided by the alarm manger on Android.
I guess that the Xiaomi app provides “alarm clock - 1h”, so it can then start a service to keep the device awake for this hour. Other apps behave similar.
The only thing you can do here is to subtract one hour in the server side rule.

There’s a similar report: https://github.com/openhab/openhab-android/issues/1721