You may be right, I don’t know but it was a federal judge that found him guilty of contempt.
I probably failed to read closely enough. I thought it was a state judge.
Turns out it was a federal district court injunction he was said to have violated.
The President can pardon any time. Most have waited till they were one foot out the door. Primarily because so many of their pardons were indefensible.