California Penal Code
If any defendant who has been released on probation is committed to a prison in this state or another state for another offense, the court which released him or her on probation shall have jurisdiction to impose sentence, if no sentence has previously been imposed for the offense for which he or she was granted probation, in the absence of the defendant, on the request of the defendant made through his or her counsel, or by himself or herself in writing, if such writing is signed in the presence of the warden of the prison in which he or she is confined or the duly authorized representative of the warden, and the warden or his or her representative attests both that the defendant has made and signed such request and that he or she states that he or she wishes the court to impose sentence in the case in which he or she was released on probation, in his or her absence and without him or her being represented by counsel.
The probation officer may, upon learning of the defendant’s imprisonment, and must within 30 days after being notified in writing by the defendant or his or her counsel, or the warden or duly authorized representative of the prison in which the defendant is confined, report such commitment to the court which released him or her on probation.
Upon being informed by the probation officer of the defendant’s confinement, or upon receipt from the warden or duly authorized representative of any prison in this state or another state of a certificate showing that the defendant is confined in prison, the court shall issue its commitment if sentence has previously been imposed. If sentence has not been previously imposed and if the defendant has requested the court through counsel or in writing in the manner herein provided to impose sentence in the case in which he or she was released on probation in his or her absence and without the presence of counsel to represent him or her, the court shall impose sentence and issue its commitment, or shall make other final order terminating its jurisdiction over the defendant in the case in which the order of probation was made. If the case is one in which sentence has previously been imposed, the court shall be deprived of jurisdiction over defendant if it does not issue its commitment or make other final order terminating its jurisdiction over defendant in the case within 60 days after being notified of the confinement. If the case is one in which sentence has not previously been imposed, the court is deprived of jurisdiction over defendant if it does not impose sentence and issue its commitment or make other final order terminating its jurisdiction over defendant in the case within 30 days after defendant has, in the manner prescribed by this section, requested imposition of sentence.
Upon imposition of sentence hereunder the commitment shall be dated as of the date upon which probation was granted. If the defendant is then in a state prison for an offense committed subsequent to the one upon which he or she has been on probation, the term of imprisonment of such defendant under a commitment issued hereunder shall commence upon the date upon which defendant was delivered to prison under commitment for his or her subsequent offense. Any terms ordered to be served consecutively shall be served as otherwise provided by law.
In the event the probation officer fails to report such commitment to the court or the court fails to impose sentence as herein provided, the court shall be deprived thereafter of all jurisdiction it may have retained in the granting of probation in said case.