(2)No person arrested under sub-section (1) shall be detained in custody(a)after his true name and address are ascertained, or(b)without the order of a Magistrate, for any longer time, not exceeding twenty four hours from the hour of arrest, than is necessary for producing him before a Magistrate.