1382. (a) The court, unless good cause to the contrary is shown,
shall order the action to be dismissed in the following cases:
(3) Regardless of when the complaint is filed, when a defendant in
a misdemeanor or infraction case is not brought to trial within 30
days after he or she is arraigned or enters his or her plea,
whichever occurs later, if the defendant is in custody at the time of
arraignment or plea, whichever occurs later, or in all other cases,
within 45 days after the defendant's arraignment or entry of the
plea, whichever occurs later