When you change the Z Rotation of an item using the numerical gizmo dialogue instead of the gizmo itself, the item will rotate along the global Z axis instead of the local one (which the X and Y axis do.)
Assumedly this isn’t supposed to change when you switch between Global and Local, but if it is, it doesn’t.