Actor: fix schedule calculation
centralize scheduling calculation
shift hours for scheduling checks by 30 minutes
use the Schedule code for Time, TimeLT, TimeGT as well

This is to make use of the time shift and avoid duplicate code.
fix TimeOfDay calculation