
89 Cal.App.3d 221 (1979)
152 Cal. Rptr. 394
In re JOHN W. HODGES on Habeas Corpus.
Docket No. 9895.
Court of Appeals of California, Third District.
February 6, 1979.
*222 COUNSEL
John W. Hodges, in pro. per., Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Ezra Hendon, Chief Assistant State Public Defender, and Tom Lundy, Deputy State Public Defender, for Petitioner.
Evelle J. Younger and George Deukmejian, Attorneys General, Jack R. Winkler, Chief Assistant Attorney General, Arnold O. Overoye, Assistant *223 Attorney General, James T. McNally and Diana B. Constantino, Deputy Attorneys General, for Respondent.
OPINION
PUGLIA, P.J.
Following the issuance of In re Rojas (1979) 23 Cal.3d 152 [151 Cal. Rptr. 649, 588 P.2d 789], we granted a rehearing in this case and vacated our decision of December 29, 1978. Rojas disapproves decisional law which posed an impediment to the correct result in our original opinion, a result for which in dicta therein we expressed a preference notwithstanding our perceived inability to achieve it. On rehearing, in our analysis of the legal issue presented, we unapologetically borrow in gross from the dicta in our original opinion.
Petitioner seeks credit for time in state prison following his return there as an escaped prisoner. The sentence against which credit is sought was imposed in respect to a charge which was brought after petitioner's apprehension; the charge arose out of petitioner's conduct at the time of his arrest as an escapee. We issued an order to show cause.
Petitioner was serving a prison term for first degree robbery when he escaped on July 11, 1976, from Growlersburg Conservation Camp, a Department of Corrections facility located in El Dorado County. On September 17, 1976, petitioner was apprehended in Sacramento County as an escaped prisoner. Three loaded concealable firearms and a quantity of heroin found in the area in which the arrest took place were seized.
Petitioner was received in Folsom Prison on September 18, 1976. Escape charges were filed against petitioner in El Dorado County but were dismissed in November 1976. On April 27, 1977, petitioner was indicted in Sacramento County for possession of heroin (Health & Saf. Code, § 11350) and possession of a concealable firearm by a convicted felon (Pen. Code, § 12021). He was arraigned thereon on June 1, 1977. The indictment was dismissed on motion of the district attorney on October 17, 1977, because a felony complaint had been filed in municipal court on September 20, 1977, charging the indictment offenses plus a count of escape without force from Growlersburg Conservation Camp. (Pen. Code, § 4530, subd. (b); see Pen. Code, § 4701.) The escape charge was subsequently dismissed by the magistrate on motion of the district attorney; petitioner was held to answer on the remaining charges. *224 Ultimately, as the result of a plea bargain, petitioner pleaded guilty to possession of heroin, and the weapons charge and allegations of prior felony convictions were dismissed. On the same day, March 31, 1978, petitioner was committed to Folsom Prison on the conviction for possession of heroin for the term prescribed by law with no credit given for presentence time in custody. His habeas corpus petition to the superior court seeking such credit was denied.
Throughout the proceedings on the Sacramento County heroin charge petitioner was confined in Folsom Prison, being transported to and from the court as required for each appearance.
Penal Code section 2900.5 provides in relevant part: "(a) In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including but not limited to any time spent in ... prison ... all days of custody of the defendant ... shall be credited upon his sentence, ...
"(b) For the purposes of this section, credit shall be given only where the custody to be credited is attributable to proceedings related to the same conduct for which the defendant has been convicted. Credit shall be given only once for a single period of custody attributable to multiple offenses for which a consecutive sentence is imposed." (As amended by Stats. 1978, ch. 304, § 1, eff. June 28, 1978.)
(1a) Petitioner contends these statutory provisions entitle him to credit upon his sentence for possession of heroin for all the time he spent in custody between June 1, 1977, the date of his arraignment on the indictment, and March 31, 1978, the date sentence was imposed for possession of heroin.[1] Petitioner's sentence for heroin possession is concurrent with his sentence for robbery. He contends that denial of credit for time served on a concurrent sentence is in effect "to impose a consecutive sentence for the presentence custody." Petitioner asserts that even though he necessarily would have remained in custody in Folsom Prison on the robbery commitment had the heroin charge never been brought, the acquisition of jurisdiction over him by Sacramento County at the time of his arraignment on that charge rendered his subsequent *225 Folsom Prison custody "in part attributable to the pending charges." Petitioner also advances an equal protection argument based on alleged disparity of treatment between state prison inmates and jail inmates, if only the latter may earn presentence custody credit. He contends that state prison inmates' constitutional rights to contest new charges brought against them will be chilled if, as a consequence of delaying the disposition of such charges, they will be forced to suffer longer terms in confinement than they would spend if the new charges were resolved quickly and the sentences begun earlier. Finally, petitioner claims that construing Penal Code section 2900.5 so as to deny him credit for presentence custody in Folsom Prison would have the effect of giving custodial administrators the power improperly to affect the length of a defendant's sentence by electing to hold him pending trial in state prison rather than in a local jail facility (where credit may assertedly be earned.)
Petitioner's contentions assume the very fact in issue, i.e., that the time he spent in Folsom Prison during pendency of the heroin charge was indeed attributable to proceedings on that accusation within the meaning of section 2900.5. But as he concedes, his status as a state prisoner would have been precisely the same had the local charge never been brought. Significantly, the converse of that proposition does not necessarily follow. Thus had petitioner not been under commitment to state prison, it cannot be said that he would necessarily have remained confined in jail, unable to secure his release on bail or recognizance. It follows syllogistically that the cause of petitioner's confinement was not the heroin charge but the prison commitment. Logically, the credit provisions of section 2900.5 should not apply to petitioner's situation.
(2) We perceive no unconstitutional denial of equal protection in refusal of credit for presentence time to those such as petitioner who are under state prison commitment where, but for that commitment, they would receive such credit if unable to secure presentence release on bail or recognizance. It is not unreasonable to deny to those under a subsisting prison sentence credit upon a later imposed term for time that in any event would be exacted as the price of an antecedent conviction, while granting such credit to others who are similarly situated except for the prior claim upon their liberty. In fact, if but for his prison commitment petitioner could arrange for his pretrial release, award of credit to petitioner notwithstanding that fact, while denying credit to the unconvicted but accused defendant because he did in fact make bail, constitutes a reward for repeated criminal conduct. (3) The purpose of Penal Code section 2900.5 is to eliminate the inequality between those *226 financially able to post bail and the poor who are unable to do so. (In re Watson (1977) 19 Cal.3d 646, 651-652 [139 Cal. Rptr. 609, 566 P.2d 243].) Petitioner's continued incarceration is a result of his recidivous criminality, not his poverty.
Nor would petitioner have been in any more advantageous position to obtain credit had presentence custody been transferred to the local authorities. The Supreme Court stated in In re Watson, supra, at page 651: "The crucial element of the statute is not where or under what conditions the defendant has been deprived of his liberty but rather whether the custody to which he has been subjected `is attributable to [proceedings related to the same conduct] ... for which the defendant has been convicted.'" Thus, whether confined in a "jail, camp, work furlough facility, halfway house, rehabilitation facility, hospital, prison, juvenile detention facility, or [in a] similar residential institution" (Pen. Code, § 2900.5, subd. (a), as amended by Stats. 1978, ch. 304, § 1), petitioner would be entitled to presentence custody credit if but only if the conduct for which he is ultimately convicted was the cause of that confinement.[2] Assuming therefore that for administrative convenience petitioner had been moved to the county jail during pendency of the heroin charges, change in the place of his confinement would not alter the incontrovertible fact that he was under commitment to and serving a term in state prison. (4) In point of fact, while in county jail, a state prison inmate is still in constructive custody of the warden of the prison from which he has been temporarily removed. (Pen. Code, § 2620.) Therefore, a change in petitioner's place of confinement from state prison to county jail would not bring petitioner within the ambit of Penal Code section 2900.5 because such custody cannot be attributed to proceedings related to the local charges. (In re Rojas, supra, 23 Cal.3d 152.)
(1b) Petitioner places primary reliance upon In re Pollack (1978) 80 Cal. App.3d 779 [145 Cal. Rptr. 833], which held that a habeas corpus petitioner who was under commitment to state prison while confined in *227 county jail pending trial of other charges, was entitled to credit for that confinement upon the sentence imposed after his conviction on the later charges, notwithstanding that his status as a felon sentenced to state prison required his continued incarceration in any event. However, the holding of Pollock was expressly disapproved in In re Rojas, supra, 23 Cal.3d 152 at page 156. There the court stated, "There is no reason in law or logic to extend [through the application of Pen. Code, § 2900.5] the protection intended to be afforded one merely charged with a crime to one already incarcerated and serving his sentence for a first offense who is then charged with a second crime. As to the latter individual the deprivation of liberty for which he seeks credit cannot be attributed to the second offense. Section 2900.5 does not authorize credit where the pending proceeding has no effect whatever upon a defendant's liberty." (Original italics.)
Petitioner's interpretation of Penal Code section 2900.5, if adopted, would create the distinct possibility in similar future cases that, barring imposition of a consecutive sentence (see generally, rules 421, 423 and 425, Cal. Rules of Court), the state's remedy would be exhausted before completion of trial and imposition of sentence on a subsequent conviction. In consequence, the seemingly infinite means to delay a criminal prosecution, most of which are uniquely within the control of the defendant, would combine to create the very real prospect that some defendants would meet themselves, as it were, leaving the prison even as they arrived to commence their terms. Fortunately such a construction of Penal Code section 2900.5 was unequivocally rejected in Rojas, the court adopting the "sensible inference" that "a defendant is only to be given credit for time spent in custody where, but for the proceedings related to the conduct for which he was eventually convicted, he might otherwise be at liberty." (Original italics; 23 Cal.3d at pp. 155-156.)
The petition for habeas corpus is denied; the order to show cause is discharged.
Evans, J., and Reynoso, J., concurred.
Petitioner's application for a hearing by the Supreme Court was denied April 9, 1979.
NOTES
[1]  In his petition, filed in pro. per., petitioner claims the right to credit for all days between his apprehension as an escapee (Sept. 17, 1976) and his sentence on the heroin offense (Mar. 31, 1978). After the order to show cause issued, the state public defender was appointed and filed the traverse on petitioner's behalf. Petitioner's extravagant claim for credit is not repeated in the traverse, the filing of which in any event renders the petition functus officio.
[2]  Petitioner contends that the 1976 amendment to Penal Code section 2900.5 (Stats. 1976, ch. 1045, § 2, pp. 4665-4666), which added "prison" to the list of institutions in which presentence credit can be earned, demonstrates a legislative intention that a later imposed sentence be credited with presentence time in prison because "no one already in prison while awaiting trial is there for reasons solely attributable to the pending charges." (Italics in original.)

The premise last stated is incorrect and renders the conclusion invalid. Commitment to a diagnostic facility of the Department of Corrections (Pen. Code, § 1203.03) or transfer of a county jail inmate to state prison for safekeeping or medical treatment (Pen. Code, § 4007) are examples of presentence state prison confinement related solely to pending charges.
