Influence of magnetism on the peak rotation of core-level photoelectrons