2023 California Code › Code of Civil Procedure - CCP › PART 3 - OF SPECIAL PROCEEDINGS OF A CIVIL NATURE › TITLE 3 - OF SUMMARY PROCEEDINGS › CHAPTER 4 - Summary Proceedings for Obtaining Possession of Real Property in Certain Cases › Section 1170.5.

1170.5. (a) If the defendant appears pursuant to Section 1170, trial of the proceeding shall be held not later than the 20th day following the date that the request to set the time of the trial is made. Judgment shall be entered thereon and, if the plaintiff prevails, a writ of execution shall be issued immediately by the court upon the request of the plaintiff.
(b) The court may extend the period for trial upon the agreement of all of the parties. No other extension of the time for trial of an action under this chapter may be granted unless the court, upon its own motion or on motion of any party, holds a hearing and renders a decision thereon as specified in subdivision (c).
(c) If trial is not held within the time specified in this section, the court, upon finding that there is a reasonable probability that the plaintiff will prevail in the action, shall determine the amount of damages, if any, to be suffered by the plaintiff by reason of the extension, and shall issue an order requiring the defendant to pay that amount into court as the rent would have otherwise become due and payable or into an escrow designated by the court for so long as the defendant remains in possession pending the termination of the action.
The determination of the amount of the payment shall be based on the plaintiff’s verified statement of the contract rent for rental payment, any verified objection thereto filed by the defendant, and the oral or demonstrative evidence presented at the hearing. The court’s determination of the amount of damages shall include consideration of any evidence, presented by the parties, embracing the issue of diminution of value or any set off permitted by law.
(d) If the defendant fails to make a payment ordered by the court, trial of the action shall be held within 15 days of the date payment was due.
(e) Any cost for administration of an escrow account pursuant to this section shall be recoverable by the prevailing party as part of any recoverable cost in the action.
(f) After trial of the action, the court shall determine the distribution of the payment made into court or the escrow designated by the court.
(g) Where payments into court or the escrow designated by the court are made pursuant to this section, the court may order that the payments be invested in an insured interest-bearing account. Interest on the account shall be allocated to the parties in the same proportions as the original funds are allocated.
(h) If any provision of this section or the application thereof to any person or circumstances is held invalid, such invalidity shall not affect other provisions or applications of the section which can be given effect without the invalid provision or application, and to this end the provisions of this section are severable.
(i) Nothing in this section shall be construed to abrogate or interfere with the precedence given to the trial of criminal cases over the trial of civil matters by Section 1050 of the Penal Code.
(Added by Stats. 1982, Ch. 1620, Sec. 2.)