Have you seen DateTime Conversion (openHAB 3.x)?
DateTime simply does not exist any more. Any time you see DateTime
in rule, that line needs to change. What it needs to change to is pretty well covered in that link above. in this case look at #4.