
42 Cal.App.3d 491 (1974)
116 Cal. Rptr. 896
JOHN M. CERDA, Petitioner,
v.
THE SUPERIOR COURT OF SANTA CLARA COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. 34274.
Court of Appeals of California, First District, Division One.
October 15, 1974.
*492 COUNSEL
James L. McIntosh, under appointment by the Court of Appeal, for Petitioner.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, Gloria F. DeHart and Ina L. Gyemant, Deputy Attorneys General, for Respondent and for Real Party in Interest.
OPINION
MOLINARI, P.J.
Petitioner seeks a writ of mandate ordering respondent superior court to file his notice of appeal from its order denying him credit for the time he was detained in the county jail pursuant to a parole hold while awaiting trial on pending criminal charges. Since the relief sought is properly the subject of relief by way of habeas corpus we have treated the petition as one for habeas corpus and have issued an order to show cause why the relief prayed for should not be granted.
(1) On November 17, 1970, petitioner was arrested upon criminal charges while on parole. A parole hold was placed on him and he remained confined in the county jail until February 19, 1971, when he was sentenced to the state prison for conviction of second degree burglary and possession of drugs. Petitioner asserts he is entitled to credit of 103 days on this sentence for his confinement prior to said sentence.
*493 Penal Code section 2900.5,[1] enacted in 1971 and effective as of March 4, 1972, provides, in pertinent part, as follows: "(a) In all felony convictions ... when the defendant has been in custody in any city, county, or city and county 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 ... (b) For the purposes of this section, 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...."
In In re Kapperman (1974) 11 Cal.3d 542, 549 [114 Cal. Rptr. 97, 522 P.2d 657], it was held that "section 2900.5 must be applied to all felony convictions, and not only to those in which presentence detention occurred as a result of indigency and ability to post bail." Kapperman also holds that section 2900.5 is fully retroactive notwithstanding the contrary provision of its subdivision (c).[2] (At p. 550.)
The presentence custody in the instant case is "attributable to charges arising from the same criminal act or acts" for which he was sentenced on February 19, 1971. It is undisputed that the parole hold was placed on petitioner solely because of the new charges. That hold was placed on him the same day he was arrested on said charges. The effect of such a parole hold was to preclude petitioner from obtaining his release on bail on the new charges. (In re Law, 10 Cal.3d 21, 26 [109 Cal. Rptr. 573, 513 P.2d 621].) Section 2900.5 is therefore operative as to petitioner.
The People contend that section 2900.5 does not apply to petitioner because it would lead to the unwarranted result giving him a double credit for the time he was incarcerated in the county jail. They argue that the custody in the instant case was attributable to or legally caused by the prior felony conviction and the parole hold, and that, since petitioner will receive credit on the term fixed for the prior felony conviction for which he had been paroled, it was not the legislative intent that he also receive a credit towards the sentence imposed on the new charges, i.e., the criminal charges for the acts of which he was sentenced on February 19, 1971. Reliance is placed by the People on Aguilera v. California Dept. of Corrections (1966) 247 Cal. App.2d 150 [55 Cal. Rptr. 292].
In Aguilera the Adult Authority had ordered a cancellation of the parolee's parole and ordered him returned to prison. He was arrested and *494 held in custody in the county jail under the authority's order and charges of misdemeanor traffic offenses. The appellate court held that the prisoner's period of custody while awaiting trial on the misdemeanor charges, while awaiting return to prison after completion of the misdemeanor sentence, and pending return to prison after a subsequent cancellation of his parole, constituted a "return to custody" within the meaning of section 3064[3] and counted toward the term of his prison sentence. (247 Cal. App.2d at pp. 153-154.) The rationale of Aguilera is that when a parolee is jailed by an officer acting expressly under the Adult Authority's order or where his return to prison is delayed solely because the authority consents to his detention in jail the parolee is effectively held in actual custody and has been returned to prison custody. (247 Cal. App.2d at pp. 153-154; see In re Clark, 254 Cal. App.2d 1, at pp. 2-3 [61 Cal. Rptr. 902].)
Petitioner asserts that there is only one term to which the subject county jail time can be credited because he was sentenced on the new charges to a term which was to run consecutive to that imposed on the previous felony sentence for which he had been paroled.[4] It is petitioner's contention that under a sentence imposing consecutive terms of imprisonment the consecutive terms merge into a single term. Petitioner relies on In re Cowen, 27 Cal.2d 637, 643 [166 P.2d 279], wherein it was held that for purposes of computing and allowing credits on the term of imprisonment a prisoner confined under consecutive sentences must be regarded as undergoing a single continuous term of confinement rather than a series of distinct, independent terms. (See In re Albori, 218 Cal. 34, 37 [21 P.2d 423]; and see 55 Ops.Cal.Atty.Gen. (1972) 318, 321.)
In resolving these contentions we first observe that in the present case there was no cancellation of parole as there was in Aguilera. This distinction is of no moment, however, since the "parole hold" in the present case produced the same result as did the order in Aguilera. (See In re Law, supra, 10 Cal.3d at p. 23, fn. 2.) We also note that Aguilera was decided prior to the enactment of section 2900.5. We note, further, that Aguilera was not concerned with a subsequent felony conviction upon which either a concurrent or consecutive term was imposed in respect to the felony term for which the prisoner had been paroled, but, rather whether the prisoner was entitled to credit on such prison term for the period during *495 which he was in the county jail pursuant to a hold on order of the Adult Authority, while he was confined in the county jail awaiting trial on misdemeanor charges, and while he served a sentence upon conviction of said charges.
In any event under the provisions of section 2900.5 and the interpretation placed on it by Kapperman petitioner is entitled to credit upon the sentence on the new charges for the period of time he was in custody in the county jail because such custody was attributable to the new charges. If, as contended by petitioner himself, the term of imprisonment on the new charges has merged into the previous term petitioner is entitled to only one credit for the subject period of custody in the county jail. On the other hand, if as asserted by the People a double credit will result we see no proscription against such a consequence in the language of section 2900.5 as interpreted by Kapperman. We are disposed, however, to agree with petitioner's contention that the time credit to which petitioner is entitled must be computed on the total term of confinement rather than upon the separate terms. We have not been called upon, however, to determine the effect of the subject time credit upon petitionr's prior prison term but only whether he is entitled to such credit on the term imposed on the new charges. Since petitioner is asserting that he is entitled to only one credit for the subject period of jail custody on a single continuous term of confinement in the state prison for purposes of computing and allowing credits, a concurrence with such contention by the Adult Authority will moot the double credit question herein tendered by the People.
The Adult Authority is directed to allow petitioner 103 days' credit on the sentence imposed on February 19, 1971, for second degree burglary and possession of drugs in action No. 49977, Superior Court of the State of California, for the County of Santa Clara.
Sims, J., and Elkington, J., concurred.
NOTES
[1]  Unless otherwise indicated all statutory references are to the Penal Code.
[2]  Subdivision (c) of section 2900.5 provides: "This section shall be applicable only to those persons who are delivered into the custody of the Director of Corrections on or after the effective date of this section."
[3]  Section 3064 provides: "From and after the suspension or revocation of the parole of any prisoner and until his return to custody he shall be deemed an escapee and fugitive from justice and no part of the time during which he is an escapee and fugitive from justice shall be part of his term."
[4]  The record discloses that the sentences on the new charges were ordered to run concurrently but consecutive to the prior sentence.
