
80 Cal.App.3d 779 (1978)
145 Cal. Rptr. 833
In re MICHAEL L. POLLOCK on Habeas Corpus.
Docket No. 3493.
Court of Appeals of California, Fifth District.
May 10, 1978.
*780 COUNSEL
Michael L. Pollock, in pro. per., and Daniel T. Dauenhauer, under appointment by the Court of Appeal, for Petitioner.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Eddie T. Keller and Gary A. Binkerd, Deputy Attorneys General, for Respondent.
*781 OPINION
TUTTLE, J.[*]
All persons convicted of felony offenses are entitled to credit for time spent in custody prior to the commencement of their prison sentence. (Pen. Code, § 2900.5, subd. (a).)[1] The question raised by this petition for habeas corpus relief is whether a defendant is entitled to receive credit upon a prison sentence for the period of jail time spent awaiting disposition of the criminal proceedings which resulted in that sentence if during that same period of custody the defendant is serving a prison sentence on a conviction for an unrelated offense.
The dispute centers upon a portion of the time petitioner spent in a jail in Santa Clara County. On April 11, 1976, petitioner was arrested for an armed robbery he committed in Santa Clara County and was placed in the Santa Clara jail. On September 3, 1976, petitioner was sentenced to state prison on the Santa Clara armed robbery, following a court trial at which he was found guilty of the charge. If there were no other facts, petitioner would be entitled to credit upon his Santa Clara armed robbery conviction for all the days he spent in jail awaiting trial and sentencing thereon, which was from the day of his arrest on April 11, 1976, to the time he was sentenced on that conviction on September 3, 1976;[2] this would be a total of 146 days.[3]
The complication arises because while petitioner was in the Santa Clara jail he was arrested on May 18, 1976, for a burglary he committed in San Mateo County some six months earlier on November 3, 1975; following his guilty plea to the San Mateo burglary charge, petitioner was sentenced to state prison on that conviction on June 4, 1976. However, *782 petitioner was not transferred directly to a state prison facility to serve his sentence on the burglary conviction; he remained in the Santa Clara jail pending the disposition of the armed robbery charge. Nevertheless, pursuant to the first paragraph of section 2900, which permits the Director of Corrections to place a person committed to state prison in a local jail, petitioner's term of imprisonment on the San Mateo burglary conviction immediately commenced to run.[4]
On the Santa Clara armed robbery conviction petitioner has been awarded only 54 days of presentence credit for time served in local custody from April 11, 1976 (the date petitioner was arrested on the Santa Clara charge), to and including June 3, 1976 (the day before the state prison sentence was imposed on the San Mateo conviction). Neither the Superior Court of Santa Clara County nor the Department of Corrections has given petitioner credit for presentence custody on his Santa Clara conviction for the time he spent in the Santa Clara jail from June 4, 1976 (the date petitioner was sentenced on the San Mateo conviction), to and including September 3, 1976 (the date petitioner was sentenced on the Santa Clara conviction), a total of 92 days. In the instant proceeding petitioner seeks credit on his Santa Clara conviction for these 92 days spent in custody prior to the imposition of sentence on that conviction.[5]
The Attorney General concedes "... that petitioner is entitled to credit for whatever presentence custody is attributable to his Santa Clara conviction." But the Attorney General contends that petitioner is not entitled to be given credit on his Santa Clara conviction for the 92 days served in the Santa Clara jail from June 4, 1976 (the day petitioner was sentenced on the San Mateo conviction), until September 3, 1976 (the day petitioner was sentenced on the Santa Clara conviction), because that incarceration was attributable to petitioner's prison sentence on the San Mateo conviction.
In support of this position, the Attorney General points to subdivision (b) of section 2900.5 which presently states that "... credit shall be given only where the custody to be credited is attributable to proceedings *783 related to the same conduct for which the defendnt has been convicted."[6] The Attorney General claims that since the San Mateo offense was unrelated to the Santa Clara offense, and petitioner was serving a term of imprisonment on the San Mateo offense during the 92 days in question, petitioner cannot be given presentence credit on the Santa Clara offense for the same 92 days.
To some degree, it appears that the Attorney General is arguing that subdivision (b) of section 2900.5 should be read as though it contained an additional word, that is, "... credit shall be given only where the custody to be credited is attributable exclusively to proceedings related to the same conduct for which the defendant has been convicted." The Attorney General avers that such a construction is necessary because otherwise petitioner would be getting what is tantamount to a double credit. But the facts before us preclude the Attorney General from pressing that argument too far; petitioner here was granted double credit for a total of 17 days from May 18, 1976, to and including June 3, 1976. The Attorney General recognizes this, but asserts that subdivision (b) of section 2900.5 "... should not be construed as allowing any additional double credit for [petitioner]."
Another difficulty with the Attorney General's position arises from the indisputable fact that, even had there been no San Mateo conviction, petitioner nevertheless would have been in the Santa Clara jail awaiting trial and sentencing on the Santa Clara offense. It cannot fairly be said that the time so served is not attributable to the Santa Clara armed robbery conviction; at most, it could be said that the time served was not exclusively attributable to that crime. The Legislature, of course, could have inserted the word "exclusively" in the statute, but it did not. (1) Accordingly, we interpret section 2900.5 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.
Our conclusion is supported by In re Bentley (1974) 43 Cal. App.3d 988 [118 Cal. Rptr. 452]. There the petitioner was convicted of robbery in San *784 Diego and sentenced to state prison; thereafter the conviction was reversed and the petitioner was returned to San Diego County for retrial where once again he was convicted of the robbery. At the time the petitioner committed the robbery he was on parole on a narcotics conviction; after he was arrested for the robbery a parole hold was placed on him; later the parole was revoked. The petitioner still was serving his prison sentence on the narcotics conviction when he was convicted of the robbery on retrial after the reversal. Thus, all of the time subsequent to the reversal when the petitioner was in the local jail awaiting retrial and sentencing he also was serving a prison sentence on an earlier unrelated offense.
In concluding that the petitioner was entitled to receive credit on his robbery sentence for the period of time spent in local custody subsequent to the reversal, the appellate court in Bentley pointed out that subdivision (b) of section 2900.5 does not say that credit shall be given only where the custody to be credited is attributable exclusively to charges arising from the same criminal act or acts for which the defendant has been convicted. (Supra, 43 Cal. App.3d at p. 992.) Therefore, the court in Bentley held that the petitioner could "... receive credit for the time spent in jail awaiting the second trial although receiving credit at the same time on the narcotics conviction sentence." (Supra, 43 Cal. App.3d at p. 993.)
The Attorney General in 1972, after a somewhat different analysis than he has made in the case at bench, concluded that one who escapes from state prison and then is held in a local jail pending trial for the escape is "... entitled to credit for jail time on the sentence for escape under the terms of section 2900.5 and for credit on the prior conviction." (55 Ops.Cal.Atty.Gen. 318, 322 (1972).)
A correct statement of the rule is set out in the recent case of People v. Schuler (1977) 76 Cal. App.3d 324, 330 [142 Cal. Rptr. 798], although the facts in that case are different from those of the instant case. In Schuler it was said "... that time in custody pursuant to a judgment of conviction may also be attributable to other charges pending trial or awaiting judgment."
The Attorney General's reliance upon In re Miller (1974) 41 Cal. App.3d 1046 [116 Cal. Rptr. 624] and In re Shute (1976) 58 Cal. App.3d 543 [130 Cal. Rptr. 270] is misplaced. In Miller the petitioner was in a Los Angeles jail awaiting trial on a robbery charge when he was delivered into federal custody for trial in El Paso, Texas on a federal *785 offense; in Texas the petitioner pleaded guilty to the federal crime and was sentenced on that offense. He then was returned to Los Angeles, pleaded guilty to the robbery charge and claimed 23 days credit for the time spent in the El Paso jail on the federal charge. Denying his claim, the appellate court held that "[t]he time spent by Miller in the El Paso jail in the wholly unrelated federal proceedings was not attributable in any way to the Los Angeles robbery charge." (Supra, 41 Cal. App.3d at p. 1049.)
In Shute the petitioner remained on bail in Orange County pending sentencing on a 1970 marijuana charge; he failed to appear at sentencing and was a fugitive nearly a year; in 1971 he pleaded guilty to federal charges and served a year in federal custody. Upon completing his federal sentence he was taken to San Francisco where he pleaded guilty on another marijuana charge. He then was taken back to Orange County, was sentenced for the 1970 conviction, and sought credit for the time served in federal prison. Denying the request, the appellate court in Shute, citing In re Miller, supra, 41 Cal. App.3d 1046, observed: "[Section 2900.5] says nothing about credit for time while in federal custody," and "Shute's time in federal custody ... had nothing to do with his marijuana conviction in Orange County. The federal proceeding was wholly unrelated to the state matter and custody under it was not attributable to the state case...." (Supra, 58 Cal. App.3d at p. 547.)
Both Miller and Shute are inapplicable to the case at bench. In those cases the courts held in substance that the periods of custody for which the petitioners were seeking credit were not attributable in any way to the charges on which the petitioners sought to have the credit awarded. In the case at bench petitioner was in the Santa Clara jail for the specific purpose of awaiting trial and sentencing on the Santa Clara robbery charge.
The petition for writ of habeas corpus is granted and petitioner is to receive credit upon his Santa Clara County conviction (Santa Clara County Super. Ct. action No. 62984) for 146 days of presentence custody.
The Superior Court of Santa Clara County hereby is directed to prepare an amended abstract of judgment reflecting the above adjustment and to deliver a copy of the amended abstract of judgment to the Department of Corrections.
*786 The Department of Corrections hereby is directed to amend petitioner's commitment record to conform with this opinion and to reflect the new commitment.
Brown (G.A.), P.J., and Hopper, J., concurred.
Respondent's petition for a hearing by the Supreme Court was denied July 20, 1978.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  Hereafter, unless otherwise indicated, all statutory references are to sections of the Penal Code.
[2]  At the time of petitioner's sentencing on the Santa Clara armed robbery conviction subdivision (a) of section 2900.5 read in pertinent part as follows: "In all felony convictions ... when the defendant has been in cutody in any ... jail, all days of custody of the defendant from the date of arrest to the date on which the serving of the sentence imposed commences ... shall be credited upon his sentence, ..." (Stats. 1971, ch. 1732, § 2, p. 3686.)

Effective January 1, 1977, subdivision (a) of section 2900.5 was amended to read in applicable part as follows: "In all felony... convictions ... when the defendant has been in custody, including but not limited to any time spent in a jail ... all days of custody of the defendant ... shall be credited upon his sentence, ..." (Stats. 1976, ch. 1045, § 2, p. 4665.)
[3]  In arriving at this figure of credit for presentence custody the day of arrest and the day of sentencing have been included in the calculation in accordance with proper practice.
[4]  As to the San Mateo burglary conviction petitioner was credited with 18 days of presentence custody from May 18, 1976 (the date of his arrest on the San Mateo charge), to June 4, 1976 (the day petitioner was sentenced on the San Mateo conviction).
[5]  The Santa Clara County judgment provided that that sentence was to be served concurrently with the San Mateo County sentence and any other sentence petitioner then was serving; the San Mateo County judgment directed that that sentence was to be served concurrently with any other sentence petitioner then was serving. Thus, there is no question before us involving consecutive sentences and that issue is not addressed.
[6]  At the time petitioner was sentenced in Santa Clara County, subdivision (b) of section 2900.5 provided that "... credit shall be given only where the custody to be credited is attributable to charges arising from the same criminal act or acts for which the defendant has been convicted." (Stats. 1971, ch. 1732, § 2, p. 3686.) Effective January 1, 1977, subdivision (b) of section 2900.5 was amended to read as it is now written.
