I'm working with a datetime field in my model-driven PowerApp (UCI). I'm trying to set the value to the current time using Javascript like
Xrm.Page.getAttribute("starttime").setValue(new Date())
With the default control I get:
which is the correct time and expected but when I switch to the "Time without date" control and run the same JS, I get:
which seems to be an offset by 1 hour. I don't know why the control changes the behavior - is this a bug or am I doing something wrong? My field is marked as time zone independent.