When a demurrer to any pleading is sustained or overruled, and time to amend or answer is given, the time so given runs from the service of notice of the decision or order, unless the notice is waived in open court, and the waiver entered in the minutes. When an order sustaining a demurrer without leave to amend is reversed or otherwise remanded by any order issued by a reviewing court, any amended complaint shall be filed within 30 days after the clerk of the reviewing court mails notice of the issuance of the remittitur.
Ca. Civ. Proc. Code § 472b