If at the hearing before the magistrate, it appears that the accused is the person charged with having committed the crime alleged, the magistrate must, by a warrant reciting the accusation, commit him to the county jail for such a time, not exceeding thirty days and specified in the warrant, as will enable the arrest of the accused to be made under a warrant of the Governor on a requisition of the executive authority of the State having jurisdiction of the offense, unless the accused give bail as provided in section 1552.1, or until he shall be legally discharged.