Starttime and endtime not set properly

Can you post how you have set a custom clock? processEngineConfiguration#setClock before engine creation should do the trick.

That’s already possible with the Clock implementation, which is used in the unit tests e.g. flowable-engine/modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/event/timer/BoundaryTimerEventTest.java at main · flowable/flowable-engine · GitHub

The time is changed on the engine level and all dependent services use the same clock instance.