
    [Crim. No. 14122.
    Third Dist.
    Feb. 28, 1986.]
    THE PEOPLE, Plaintiff and Respondent, v. DAN MIRANDA MURILLO, Defendant and Appellant.
    [Opinion certified for partial publication.]
    
      Counsel
    Roger F. White, under appointment by the Court of Appeal, for Defendant and Appellant.
    John K. Van de Kamp, Attorney General, W. Scott Thorpe and David de Alba, Deputy Attorneys General, for Plaintiff and Respondent.
    
      
      Pursuant to rule 976.1 of the California Rules of Court this opinion is certified for publication with the exception of part I of the Discussion,
    
   Opinion

SIMS, J.

Defendant pled guilty to second degree burglary (Pen. Code, § 459). Two factually unrelated cases were dismissed with Harvey waivers. Defendant was sentenced to the upper term of three years in state prison, with 117 days presentence credit.

On appeal, defendant challenges imposition of the upper term and the calculation of his presentence credits. In an unpublished portion of this opinion, we conclude the trial court properly imposed the upper term. In this published portion, we conclude the trial court properly denied defendant presentence credits (§§ 1203.03, subd. (g), 2900.5) for time he spent in custody attributable to the dismissed charges, including custody during a diagnostic study. (§ 1203.03.) We shall affirm the judgment.

Background

On July 21, 1983, defendant committed a burglary and was subsequently charged with this offense (§ 459) in the instant case. (Case No. 7821.) On November 22, 1983, defendant first pled guilty to the present charge of second degree burglary. On January 31, 1984, defendant’s motion to withdraw the plea was granted. Except for one day of custody following his arrest, defendant remained free on bail on this charge throughout this period of time.

On December 7, 1983, defendant was arrested for and subsequently charged with arson (§ 451) and burglary (§ 459) respecting events that occurred on November 18, 1983. (Case No. 8023.) He was released on bail following two days of custody.

On April 11, 1984, defendant was arrested for and subsequently charged with preventing or dissuading a witness or victim from attending or giving testimony (§ 136.1, subd. (c)), assault with a deadly weapon (§ 245, subd. (a)(1)), threatening with a deadly weapon (§ 417, subd. (a)(1)), and harassing by telephone (§ 653m) (case No. 2-09209). These charges arose out of events that occurred on April 10, 1984. Defendant was held in continuous custody on these charges from April 11, 1984, to the time of sentencing in the present case.

On May 15, 1984, pursuant to a plea bargain, defendant pled guilty in case No. 8023 to the reduced charge of unlawfully causing a fire (§ 452, subd. (b)). He was referred to the Department of Corrections for a diagnostic report, pursuant to section 1203.03, subdivision (a). The diagnostic report recommended denial of probation because defendant was considered a threat to others. On August 9, 1984, the court rejected defendant’s plea bargain in case No. 8023 and set aside his plea of guilty. (See § 1192.5.)

On August 14, 1984, the court revoked defendant’s bail and remanded him to custody in the present case, No. 7821. On September 18, 1984, defendant again pled guilty to the present offense in case No. 7821. Dismissed, with Harvey waivers, were the charges in the other cases (Nos. 8023 and 2-09209). Defendant was sentenced on October 30, 1984, and was given presentence credit for the day of his arrest and for time in custody from August 14, 1984, the date bail was revoked in this case, until sentencing.

Discussion

I

II

Defendant also contends he was improperly denied presentence credit for time in custody from April 11, 1984, to August 14, 1984. We disagree.

Penal Code section 2900.5, subdivision (b) provides in relevant part: “[C]redit 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.” Defendant cites In re Rojas (1979) 23 Cal.3d 152 [151 Cal.Rptr. 649, 588 P.2d 789], for the proposition that, because defendant was not serving a term of incarceration between April 11, 1984, and August 14, 1984, presentence credit for that custody is authorized. Defendant’s argument turns Rojas on its head. Rojas held that one already serving a term of incarceration on one offense and subsequently charged and held on an unrelated offense cannot attribute his deprivation of liberty to the second offense for purposes of presentence credit. “Section 2900.5 does not authorize credit where the pending proceeding has no effect whatever upon a defendant’s liberty.” (Id., at p. 156.)

Here, the only proceeding causing defendant’s confinement from April 11, 1984, to May 15, 1984, was his arrest in case No. 2-09209. Defendant’s conduct which led to his prosecution in case No. 2-09209 was wholly unrelated to the conduct that led to his conviction in the instant case. (Compare In re Atiles (1983) 33 Cal.3d 805, 810-811 [191 Cal.Rptr. 452, 662 P.2d 910].) Thus, custody between April 11 and May 15 was not attributable to proceedings related to the conduct for which defendant was convicted.

Similarly, the only proceedings causing defendant’s confinement from May 15, 1984, to August 14, 1984, were his plea in case No. 8023 and the subsequent remand to custody upon the court’s rejection of that plea. Case No. 8023 was dismissed. Defendant’s conduct that led to his prosecution in that case is wholly unrelated to his conduct forming the basis of his conviction in this case. Therefore, custody between May 15 and August 14 was not attributable to proceedings related to the conduct for which defendant was convicted in the present case.

Thus, at no time between April 11, 1984, and August 14, 1984, was defendant in custody for the present offense or for proceedings related to the same conduct. Except for the day of his arrest, defendant’s entitlement to credit began on August 14 when bail was revoked and defendant was remanded to custody in this case. He was entitled to no presentence credit for any time in custody between April 11 and August 14. (§ 2900.5, subd. (b); see People v. Cornett (1985) 165 Cal.App.3d 752, 760-761 [212 Cal.Rptr. 24]; People v. Joyner (1984) 161 Cal.App.3d 364, 367-368 [207 Cal.Rptr. 636]; People v. Schaaf (1983) 150 Cal.App.3d 45, 51-52 [197 Cal.Rptr. 458].)

Defendant suggests it was improper for the court to deny credit for custody on unrelated charges while at the same time to use the underlying facts of those charges to aggravate his sentence in this case. No authority supports this proposition. Presentence credits are authorized “only where” the custody is “attributable to proceedings related to the same conduct for which the defendant has been convicted. ” (§ 2900.5, subd. (b), italics added.) The conduct underlying the dismissed charges was unrelated to the present offense, and defendant was not convicted of those charges. He cannot now have the dismissals in those cases construed as “convictions” for purposes of presentence credit;

Nor do we find merit in defendant’s contention that presentence credit must be awarded for the time spent in diagnostic evaluation. At sentencing, the trial court relied on a diagnostic report (§ 1203.03) prepared in case No. 8023. Defendant first argues he is entitled to credit under section 2900.5 because, he asserts, the diagnostic study was ordered, in part, in relation to the present offense. However, the record will not support that view. A prerequisite to any section 1203.03 evaluation is a conviction. (§ 1203.03, subd. (a); see In re Eads (1980) 102 Cal.App.3d 499, 501 [162 Cal.Rptr. 411].) The record shows the diagnostic study was ordered on June 19, 1984, following a guilty plea in case No. 8023. Defendant’s conviction for the present offense did not occur until September 18, 1984. Thus, custody under section 1203.03 was not attributable, even in part, to the present proceedings.

Nor does subdivision (g) of section 1203.03 entitle defendant to presentence credit for time spent in the diagnostic facility. Subdivision (a) of section 1203.03 provides in pertinent part that a court may order a diagnostic evaluation, “In any case in which a defendant is convicted of an offense punishable by imprisonment in the state prison . . . .” Subdivision (g) of section 1203.03 states in relevant part that such time “shall be credited on the term of imprisonment in state prison, if any, to which defendant is sentenced in the case.” (Italics added.) Examining the entire context and substance of section 1203.03, and reading that section as a whole, as we must (see People v. Black (1982) 32 Cal.3d 1, 5 [184 Cal.Rptr. 454, 648 P.2d 104]; People v. Flannery (1985) 164 Cal.App.3d 1112, 1119, 1120 [210 Cal.Rptr. 899]), we construe subdivision (g) with reference to subdivision (a). Thus, for purposes of subdivision (g), the “case” in which the defendant is sentenced is not just any case; it is the “case in which the defendant is convicted” and for which the diagnostic study was ordered pursuant to subdivision (a). Here, the case in which defendant was sentenced was not the same case in which he was convicted and for which the diagnostic study was ordered under section 1203.03. Therefore, subdivision (g) of section 1203.03 does not authorize presentence credit for the diagnostic study.

Nor do we find this result unfair. By obtaining the dismissal of unrelated cases, including the case in which the diagnostic study was ordered, defendant avoided the possibility of numerous additional criminal convictions and substantial additional periods of incarceration. It does not offend us that he must forfeit his claim to presentence custody credit to accomplish a result otherwise beneficial to him. (See In re Handsome (1977) 72 Cal.App.3d 657, 660 [138 Cal.Rptr. 400].)

Disposition

The judgment is affirmed.

Puglia, P. J., and Evans, J., concurred.

Appendix 
      
      All further statutory references are to the Penal Code.
     
      
      
        People v. Harvey (1979) 25 Cal.3d 754 [159 Cal.Rptr. 696, 602 P.2d 396].
     
      
      The procedural history surrounding this case is somewhat complex. Our attempt to make sense of it was not aided by the clerk’s transcript, as the clerk below apparently failed to enter minutes for several proceedings directly affecting this case. Accordingly, we have had to piece together numerous strands of information, relying heavily on the probation report, in order to ascertain what occurred.
     
      
      Defendant agreed the court could consider the dismissed counts or charges in determining an- appropriate sentence.
     
      
      For those whose dependence on computers has made a graphic display of information indispensable, we have attached an appendix showing the foregoing procedural history.
     
      
      See footnote, page 232, ante.
      
     
      
      We have no occasion to address whether use of this report was encompassed by defendant’s Harvey waiver. Defendant makes no contention use of the report was improper. In any event, by failing to object to the court’s use of the diagnostic report at sentencing, defendant has waived any objection in this court. (People v. Jarvis (1982) 135 Cal.App.3d 154, 158 [185 Cal.Rptr. 16]; People v. Medina (1978) 78 Cal.App.3d 1000, 1007-1008 [144 Cal.Rptr. 581].)
     
      
      Of course, defendant had pled guilty to the instant charge in November 1983, but that plea had been vacated. The present charge was pending when defendant was convicted by plea in May 1984, in case No. 8023.
     