(a)
When an arresting officer attempts to take a person arrested for a misdemeanor or infraction of this code before a magistrate and the magistrate or person authorized to act for him or her is not available, the arresting officer shall take the person arrested, without unnecessary delay, before one of the following:
(1)
The clerk of the magistrate, who shall admit the person to bail for the full amount set for the offense in a schedule fixed as provided in Section 1269b of the Penal Code.
(2)
The officer in charge of the most accessible county or city jail or other place of detention within the county, who shall admit the person to bail for the full amount set for the offense in a schedule fixed as provided in Section 1269b of the Penal Code or may, in lieu of bail, release the person on his or her written promise to appear as provided in subdivisions (a) to (f), inclusive, of Section 853.6 of the Penal Code.
(b)
Whenever a person is taken into custody pursuant to subdivision (a) of Section 40302 and is arrested for a misdemeanor or infraction of this code pertaining to the operation of a motor vehicle, the officer in charge of the most accessible county or city jail or other place of detention within the county may detain the person arrested for a reasonable period of time, not to exceed two hours, in order to verify his or her identity.