Magnetic optical rotation from real-time simulations in finite magnetic fields