The description says it changes harm to a duration of 24 hours, but the critical failure effect is you control the undead for 1 hour. Which if any of the following is true:
1: The 24 hour duration is a mistake and you control the undead 1 minute or 1 hour, after which it goes free
2: The 24 hours is how long the spell lasts and when the undead becomes uncontrolled it has to save again until 24 hours are up or it makes the save.
3: The 24 hours is a restraint on the spell, it lasts 1 minute or 1 hour and then cant be used on that undead again because technically he already has Harm on him for 24 hours.
Edit: since improved command undead makes it last up to 24 hours, I assume the 24 hour duration is just a precaution and the answer is: you control the undead as long as the result indicates and the remaining time does nothing at all, positive or negative.
So my other question is why are you only allowed to have 4 undead minions at a time? That is really terrible for anyone who wants to be a necromancer. (not that you can control more than realistically 1-2 at a time anyway thanks to the terrible minion system trying to prevent "undesirable" gamestates)