Quote from the Tropico 4 wiki on the "Reeducation mode" of the prison:
Reeducation: Prisoners are put through courses of re-education, raising their respect by 20% by the time they're released.
Sadly, I can't find minimum time (hard data is kind of hard to find on this game honestly). But I usually release my prisoners after about 30min of playtime, and if they misbehave again I simply put them back in jail again, waiting another 30min.