Fix the problem that expects the current datetime when the action type is resident.