The time to be specified in the summons or notice provided for in section 39-07-07 must be within thirty-five days after the issuance of the summons or notice or earlier if so ordered by the magistrate of the city or county having jurisdiction over the offense or if the person halted demands an earlier hearing. If the person halted desires, the person may have the right, at a convenient hour, to an immediate hearing or to a hearing within twenty-four hours. The hearing must be before a magistrate of the city or county in which the offense was committed. If an immediate hearing is demanded, a district judge serving the county, with the consent of the respective prosecuting attorneys, may order the hearing to be held in any of the counties in which the district judge has jurisdiction, rather than in the county where the offense was allegedly committed. Upon the receipt from the person halted of a written promise to appear at the time and place mentioned in the summons or notice, the officer shall release the person from custody. Any person refusing to give a written promise to appear must be taken immediately by the halting officer before the nearest or most accessible magistrate, or to such other place or before such other person as may be provided by a statute or ordinance authorizing the giving of bail. Any person willfully violating the person's written promise to appear is guilty of a class B misdemeanor, regardless of the disposition of the charge upon which the person originally was halted. The time limitations for a hearing as provided by this section do not preclude a recharging of the alleged violation if the person being charged receives a new summons or notice subject to the provisions of this section.