Opinion
GRODIN, J.Petitioner, who is serving a prison sentence for robbery, seeks credit under Penal Code section 2900.51 for time spent in county jail awaiting trial on the charges which led to his imprisonment. During this period he was unable to obtain his freedom by posting bail because the Parole and Community Services Division of the Department of Corrections had placed a “hold” on him. The Court of Appeal ruled that petitioner was not entitled to credit because his presentence confinement was attributable, in part, to custody on revocation of parole. This court granted a hearing to resolve an apparent conflict between this conclusion and the contrary results reached in other cases.
The procedural history of the case can be summarized briefly. In 1977, petitioner was convicted of robbery and sentenced to prison. The following year he was released on parole. On May 3, 1979, while free on parole, he was arrested and charged with robbery and sodomy, both counts arising from a single incident, and a parole hold was placed on him. Petitioner waived his right to contest the parole violation charges and on May 25, 1979, the Board of Prison Terms revoked his parole and ordered that he be returned to custody for a six-month period. That period, measured from the date of the hold, expired on November 3, 1979. Petitioner was released from custody on bail on November 6, 1979, to await disposition of the criminal charges. He pleaded guilty to robbery and was sentenced to a three-year term for that offense, as well as a one-year consecutive term for his prior conviction. (§ 667.5, subd. (b).) The trial court *808granted credit only for the three days of presentence confinement between November 3 and November 6, 1979. Petitioner sought relief through petition for writ of habeas corpus filed in the Court of Appeal, where his petition was denied.
Section 2900.5, pursuant to which petitioner seeks credit, provides in pertinent part: “(a) In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including . . . any time spent in a jail, ... all days of custody of the defendant, . . . shall be credited upon his term of imprisonment, . . . . [f] (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.” (Italics added.)
This court had occasion to construe the limiting language of subdivision (b) in In re Rojas (1979) 23 Cal.3d 152 [151 Cal.Rptr. 649, 588 P.2d 789]. The petitioner in that case, while in prison for manslaughter, was charged with an unrelated murder, arid transferred to Los Angeles County jail to await trial. Upon being convicted and sentenced for the second offense, he contended that he was entitled to credit under section 2900.5 for the 207 days he spent in county jail. The issue, as we stated it, was whether defendant was entitled to credit for such time “when he would necessarily have served that 207-day period in state prison for the original manslaughter conviction and when he was already receiving credit for that period against his original conviction. ” (Id., at p. 155, italics added.) Reasoning from both the language of the statute and its apparent purpose, we concluded that section 2900.5 did not authorize credit because the second offense had no effect on the defendant’s liberty. (Id., at p. 156.)
In the course of our opinion in Rojas we considered and rejected the petitioner’s reliance upon the Court of Appeal decision in In re Bentley (1974) 43 Cal.App.3d 988 [118 Cal.Rptr. 452], upon grounds highly relevant to the issue presented here. In Bentley, as here, the petitioner had been on parole pursuant to a prior conviction when he was arrested for a new offense, and confined pursuant to a parole hold while awaiting trial. The court in Bentley decided that subdivision (b) did not preclude credit in such a situation. It did so, however, on the basis of reasoning which, as we said in Rojas, involved an “unnecessary semantic exercise . . . [which] injected a nonexistent ambiguity into the statute” (23 Cal.3d at p. 157)—i.e., the court opined that credit was due because the language of the subdivision “does not say ‘attributable exclusively to charges arising,’ etc.” (43 Cal.App.3d at p. 992, italics in original.) This “questionable reasoning,” we observed, had been applied in some subsequent cases “to less favorable factual situations, thereby reaching results which do *809not appear to have been intended by the drafters of section 2900.5” and we disapproved that reasoning, as well as the holding in In re Pollock (1978) 80 Cal.App.3d 779 [145 Cal.Rptr. 883], which had applied the Bentley reasoning to a quite disparate context.2
We did not, however, disapprove of the holding in Bentley. On the contrary, we stated: “The cases upon which defendant relies are, as closer analysis reveals, consistent with the foregoing interpretation of section 2900.5. In In re Bentley [citation], the defendant was on parole pursuant to a prior narcotics conviction when he was arrested for robbery. It was the new charge which caused his loss of physical freedom and thus the time in custody for which he sought credit was based on the same conduct for which he was convicted, the robbery charge. A literal interpretation of section 2900.5 would have allowed Bentley his credit under those facts. ” (23 Cal.3d at p. 157, italics added.)
Courts of Appeal in several recent cases have recognized that our opinion in Rojas approved the holding in Bentley as applied to the parole context. In People v. Penner (1980) 111 Cal.App.3d 168 [168 Cal.Rptr. 431], the court, distinguishing Rojas, upheld an award of credit for six months jail time during which the defendant was simultaneously serving a parole revocation period of custody and awaiting trial on charges based on the conduct underlying the parole revocation. The court noted it was clear that the same conduct was the basis for both proceedings, and held that the six months of custody was, therefore, “attributable” to the new criminal proceedings, as well as to the parole revocation proceedings. (111 Cal.App.3d at p. 170.) Similarly, in People v. Simpson (1981) 120 Cal.App.3d 772 [174 Cal.Rptr. 790], and most recently in In re Anderson (1982) 136 Cal.App.3d 472 [186 Cal.Rptr. 269], the Court of Appeal ordered that credit be awarded for time in local custody awaiting trial during which period the defendant’s parole had been revoked. As the Anderson court observed, “the crucial test is not whether a defendant is serving a sentence during the time he seeks credit for a second offense. Instead, Rojas requires that an inquiry be made into whether the second offense was the cause of the sentence being served.” (In re Anderson, supra, 136 Cal.App.3d at p. 475.)
Here, as in each of these cases, petitioner was not serving his term when arrested. He was on parole. The conduct which led to his arrest and conviction on the new criminal charge also formed a basis for the parole hold and subsequent revocation proceedings. Thus his custody in the county jail was, literally, “attributable to proceedings related to the same conduct for which the *810defendant has been convicted” (§ 2900.5, subd. (b)) on November 19, 1979, and he is entitled to credit on the 1979 term for the six-month period in question.
Respondent concedes that had petitioner been charged only with robbery in the new criminal proceeding, and only with the commission of that offense as a basis for revocation of parole, he would be entitled to the credit he seeks. He argues, however, that because the time petitioner served in presentence custody in, the county jail was attributable to the act of sodomy which was charged both as a criminal offense and a parole violation, and to a third parole violation charge,3 the time was not “attributable” to the robbery conviction within the meaning of section 2900.5. He relies in part on our observation in Rojas that the Bentley court’s statement that section 2900.5 did not require that the time in custody be “exclusively” attributable to the conduct leading to the conviction on which credit was sought was unnecessary to the result. That observation, however, does not establish the contrary proposition for which respondent argues. it was not a holding that the custody must be attributable exclusively to the conduct underlying the term ultimately imposed.4
In determining whether custody for which credit is sought under section 2900.5 is “attributable to proceedings leading to the conviction,” the sentencing court is not required to eliminate all other possible bases for the defendant’s presentence incarceration. The court need only determine that the defendant was not already serving a term for an unrelated offense when restraints related to the new charge were imposed on him, and the conduct related to the new charge is a basis for those restraints.5 Nothing in the language of section 2900.5 *811suggests that the Legislature intended to permit a sentencing court or this court to speculate, as suggested by respondent, that a defendant whose parole has been revoked while he awaits trial on new charges would have been ordered confined by the board on the basis of charges other than those leading to conviction. Indeed, in many cases the new criminal charges may be disposed of before the parole revocation proceedings have concluded and the sentencing court cannot know whether revocation is ordered or any custody time is imposed.
We are satisfied that the Legislature intended that “custody . . . attributable to proceedings related to the same conduct for which the defendant has been convicted” include time in presentence custody during which a restraint or restraints related to that conduct made it impossible for the defendant to obtain his freedom, regardless of whether the defendant was also subject to other restraints on his liberty. Our conclusion is based on the literal language of subdivision (b) of section 2900.5, pursuant to the well-established principle of statutory interpretation that if no ambiguity, uncertainty, or doubt about the meaning of a statute appears, the provision is to be applied according to its terms without further judicial construction. (Morse v. Municipal Court (1974) 13 Cal.3d 149, 156 [118 Cal.Rptr. 14, 529 P.2d 46].)6
The statutory language upon which we rely has not changed since our opinion in Rojas. On the other hand, the Legislature did amend subdivision (b) in 1978 *812to add the second sentence: “Credit shall be given only once for a single period of custody attributable to multiple offenses for which a consecutive sentence is imposed.” (Stats. 1978, ch. 304, § 1, p. 632.) This narrowly drafted amendment has the effect of rejecting the expansive construction given section 2900.5 in Cerda v. Superior Court (1974) 42 Cal.App.3d 491 [116 Cal.Rptr. 896], a pre-Bentley case in which the court ordered that a parolee be given credit for presentence confinement on a second offense even though the new term was to be consecutive to the original term on which the petitioner had been paroled. The amendment did not, however, affect the holding in Bentley. The limited focus of the amendment suggests that the holding in Bentley met with legislative approval as well. (In re Gladys R. (1970) 1 Cal.3d 855, 868-869 [83 Cal.Rptr. 671, 464 P.2d 127]. Cf. People v. Daniels (1969) 71 Cal.2d 1119, 1127-1128 [80 Cal.Rptr. 897, 459 P.2d 225, 43 A.L.R.3d 677].) Since the same “literal language” of the statute entitles this petitioner to credit we presume that the Legislature intended subdivision (b) to apply even though the parole hold and new information charged offenses other than that of which petitioner was convicted.
Moreover, even if we were to perceive ambiguity in subdivision (b), our construction of this provision would be required by familiar rules which call for construction to effectuate the legislative purpose (Morse v. Municipal Court, supra, 13 Cal.3d 149, 156) and, in the case of penal statutes, for the resolution of ambiguity in favor of the criminal defendant (People v. King (1978) 22 Cal.3d 12, 23 [148 Cal.Rptr. 409, 582 P.2d 1000]).
Our construction of section 2900.5 is compatible with the dual legislative purpose of “eliminating] the unequal treatment suffered by indigent defendants who, because of their inability to post bail, served a longer overall confinement than their wealthier counterparts” (In re Rojas, supra, 23 Cal.3d at p. 156) and equalizing the actual time served in custody for given offenses. (People v. Riolo (1983) 33 Cal.3d 223, 228 [188 Cal.Rptr. 371, 655 P.2d 723].)
Unequal treatment follows not only from denial of credit altogether for presentence jail time, however, but also from denial of credit on multiple concurrent terms. This may occur if a defendant seeks separate trials on severable charges to ensure his right to a fair trial, if a prosecutor does not join multiple counts in a single accusatory pleading, or if a defendant faces charges in more than one jurisdiction. It may also occur in cases such as this in which parole revocation proceedings and new charges are pending simultaneously if the defendant does not promptly plead guilty and seek immediate sentencing. In each of these situations, the possibility of unequal treatment exists if concurrent terms are imposed, but because sentence has been imposed or parole revoked in the first proceeding before the others are tried, credit for time in jail while *813awaiting disposition of the remaining charges is denied. The terms then are not truly concurrent since the effect of denying credit on the later terms is that they commence only on the date sentence is pronounced. The time between sentencing in the first proceeding and that in the second is, as to the second term, “dead time.” The Legislature has not either expressly or by implication indicated an intent to deny dual credit in any of these situations.7
Were we to construe section 2900.5 as prohibiting dual credit when concurrent terms are imposed in the above circumstances, the legislative purpose of avoiding unequal treatment of prisoners would be frustrated, not furthered. The length of imprisonment would depend upon the fortuitous charging decision of a prosecutor or on a defendant’s election to seek separate trials.
Nor is it relevant that under the determinate sentence law (DSL) (§ 1170 et seq.) the period of custody on revocation of parole may be served before the new charges are resolved. Section 2900.5 was enacted in 1971, several years before the DSL became operative on July 1, 1977. Although the Legislature has amended the section twice since the DSL was enacted (Stats. 1978, ch. 304, § 1; Stats. 1980, ch. 297, § 1) no change has been made which suggests a legislative intent to preclude dual credit when terms are concurrent.
Respondent’s argument that granting credit to a parolee who suffers a new conviction dilutes the deterrent effect of a return to custody for revocation of parole because, under the DSL the new term may not be ordered to run consecutively to the term from which the parolee was discharged when released on parole (People v. Penner, supra, 111 Cal.App.3d 168, 172; People v. Mathews (1980) 102 Cal.App.3d 704, 713 [162 Cal.Rptr. 615]) does not withstand scrutiny. The defendant does not, as argued by respondent, reap a “windfall.” The sentence imposed for the new offense may reflect the fact that the defendant was on parole when he committed a new offense either by imposition of the aggravated term (§ 1170, subd. (b); Cal. Rules of Court, rule 421(b)(4)) or by imposition of a consecutive term for the prior conviction (§ 667.5; In re Kelly (1983) 33 Cal.3d 267 [188 Cal.Rptr. 447, 655 P.2d 1282]). As we had occasion to note in People v. Riolo, supra, 33 Cal.3d 223, 230, the wisdom of the statutory sentencing scheme of the DSL is not an issue to be considered by this court. Section 2900.5 was enacted long before the DSL became operative. Any change in these credit provisions to reflect the impact of the DSL must be made by the Legislature.
*814The Sacramento County Superior Court is ordered to modify its judgment in People v. Rick A. Atiles, No. 56246, granting petitioner credit pursuant to Penal Code section 2900.5 for the period between May 3, 1979, and November 3, 1979, and to forward a modified abstract of judgment to the Department of Corrections. Because petitioner is not presently entitled to release from custody, the order to show cause is discharged and the petition for writ of habeas corpus is denied in all other respects.
Kaus, J., Broussard, J., and Reynoso, J., concurred.
All references to code sections herein are to the Penal Code.
In Pollock, section 2900.5 was interpreted “to provide that a defendant is entitled to receive credit upon a prison sentence for time spent in jail awaiting disposition of the criminal proceedings resulting in that sentence even though during that same period of jail time the defendant is serving a prison sentence on another conviction.” (80 Cal.App.3d at p. 783.)
Although neither petitioner nor respondent has provided a copy of the parole violation charges, the summary of revocation hearing and decision confirms that petitioner admitted a first, unidentified, charge, and was found guilty of the second and third charges which were robbery and sodomy charges based on the same conduct as the criminal charges. Respondent asserted at oral argument that the unidentified charge was a violation of a condition of petitioner’s parole that he not drink alcoholic beverages.
Contrary to the assumption implicit in the dissenting opinion that violation of the condition that he abstain from use of alcohol was a decisive factor in the board’s revocation of parole, the summary of May 25, 1979, recites that good cause was found as to each of the three charged violations. That summary noted that the charges included the sexual assault, and that the parolee’s behavior was becoming “more serious as he has become a threat to safety of others. ” The summary of August 29, 1979, also recites that good cause was found as to all three charges, and that the “panel viewed [parolee’s] behavior as requiring the full amount permitted under current law. ” At no time has respondent denied that the robbery and sodomy were factors in the decision to revoke parole. We cannot join in the assumption that revocation for the maximum period of six months was based on violation of the alcoholic beverage condition.
Were we to accept that proposition, credit would be denied a nonparolee charged with two offenses and acquitted of one. Rules of statutory construction require courts to construe a statute to promote its purpose, render it reasonable, and avoid absurd consequences. (Landrum v. Superior Court (1981) 30 Cal.3d 1, 9 [177 CaI.Rptr. 325, 634 P.2d 352].)
Restraints which make it impossible for a defendant to obtain his freedom pending trial include a parole hold (see In re Law (1973) 10 Cal.3d 21 [109 Cal.Rptr. 573, 513 P.2d 621]) and bail fixed in an amount that the defendant, whether indigent or not, cannot or does not post.
The cases relied on by respondent are consistent with this analysis. In People v. Brown (1980) 107 Cal.App.3d 858 [166 Cal.Rptr. 144], the defendant, while on probation granted by the San Bernardino County Superior Court, was convicted of a new offense in Los Angeles County and served a jail term as a condition of probation granted on the new offense. Upon his release he was returned to San Bernardino County where his probation was revoked. He did not seek credit against the San Bernardino term for the period during which he served the probationary term in Los Angeles County. When he claimed on appeal that he was entitled to credit for this time under section 2900.5, the Court of Appeal properly concluded that in the absence of evidence that the custody was related to the San Bernardino County proceedings the defendant was not entitled to credit. In People v. Minjarez (1980) 102 Cal.App.3d 309 [162 Cal.Rptr. 292], the defendant was awaiting trial on a 1977 murder charge when he was placed on probation for an unrelated 1976 offense and ordered to serve one year in the county jail. Thereafter, he was sentenced to a term of imprisonment for yet another unrelated 1976 offense. He was finally convicted of manslaughter in the 1977 case in 1979 and was sentenced to a consecutive term. The trial court awarded credit on the manslaughter term for the entire period from his arrest on the 1977 charge to the date judgment was imposed in 1979. The Court of Appeal reversed the award of credit holding that the custody from the date the probation term began on the first 1976 matter was unrelated to the 1977 term. The opinion does not reveal whether the defendant was being held for trial on all three matters simultaneously, but because the manslaughter term was ordered to be consecutive to the other terms, dual credit was not authorized. In People v. Macias (1979) 93 Cal.App.3d 788 [156 Cal.Rptr. 104], the defendant was already serving a prison term when he was charged with a new offense. In In re Hodges (1979) 89 Cal.App.3d 221 [152 Cal.Rptr. 394], the defendant was serving a prison term when he escaped and committed new offenses. After he had been returned to prison he was charged with the new offenses. In each case the Court of Appeal correctly analogized the situation to that of the defendant in Rojas and held the defendants were not entitled to credit on the terms imposed for the new offenses because as prisoners already serving terms when the new charges were filed they were in custody that was not related to the new charges.
Because we base our conclusion that petitioner is entitled to the credit he seeks on the language of section 2900.5, we need not consider petitioner’s additional arguments that the statute might be invalid if construed to deny credit to a defendant whose presentence incarceration is prolonged as a result of his exercise of constitutional rights directed to ensuring a fair trial.