Determination of the event collision time with the ALICE detector at the LHC