Shock formation in magnetised electron–positron plasmas: mechanism and timing