
24 Cal.App.4th 238 (1994)
30 Cal. Rptr.2d 102
THE PEOPLE, Plaintiff and Respondent,
v.
SAUL DANIEL VALDEZ, Defendant and Appellant.
Docket No. B075928.
Court of Appeals of California, Second District, Division Four.
April 19, 1994.
*239 COUNSEL
William D. Caldwell, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Carol Wendelin Pollack, Assistant Attorney General, Marc E. Turchin and Steven D. Matthews, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
*240 OPINION
EPSTEIN, Acting P.J.
Saul Daniel Valdez appeals from judgment of conviction of residential burglary. (Pen. Code, § 459; all further statutory references are to the Penal Code unless otherwise indicated.) In the published portion of the opinion, we reject his argument that the trial court erred in imposing a one-year enhancement for a prior felony for which he served a portion of his imprisonment in the California Rehabilitation Center. We conclude that his prior prison term was a proper basis for the enhancement.
In the unpublished portion of the opinion, we reject appellant's challenges to jury instructions on reasonable doubt, circumstantial evidence, and flight. We agree with appellant that a second enhancement for a prior prison term arising out of the same offense should have been stricken rather than stayed. Appellant also argues that the trial court improperly used factors related to a prior felony in imposing the upper term for the burglary count. We disagree, and find that there was a substantial basis for imposition of the upper term. We also reject appellant's argument that the trial court should have found that the aggravating factors outweighed mitigating factors; there were no mitigating factors. Appellant contends that the trial court failed to make the requisite findings for imposition of a restitution order to be paid to the victim. That argument is not supported by the record, which reflects that the restitution fine was to be paid to the state Restitution Fund and we conclude that there was no error. Finally, we agree with respondent's contention that appellant was credited with one day too much presentence credit, and we modify the judgment to reflect the proper calculation.

FACTUAL AND PROCEDURAL SUMMARY

A
On December 16, 1992, Raul Campos, a maintenance person, was in a walkway next to the apartment building where he worked. He was replacing a screen door. He saw a jeans-clad leg and a foot with a tennis shoe entering the bathroom window of unit No. 103, which was occupied by Jack Reade. Mr. Campos reported this sighting to the resident manager, Carolyn Lambert, who told him that no one was authorized to make such an entry. Ms. Lambert went to the front of the apartment complex while Mr. Campos returned to a point where he could view the walkway. Mr. Campos then saw appellant leave Jack Reade's apartment, either by the sliding glass door or through the bathroom window. Appellant jumped a low wall onto a walkway *241 adjacent to a neighboring apartment building and crouched in a doorway of that building. He then walked toward Mr. Campos and Ms. Lambert, in the direction of Lindley Street. Appellant came within five feet of the two witnesses, who identified him at trial.
Ms. Lambert demanded to know what appellant was doing, and he responded by saying "Hello." He continued to walk away from the witnesses toward the entrance of the adjoining apartment building, which had a security gate. Appellant was "fiddling" with what appeared to be a wallet. He stood at the security gate for about 20 seconds, then walked to the corner of Lindley and Killian, turned right and walked slowly away.
At that point, Ms. Lambert left to call the police, and Mr. Campos continued to follow appellant. Although it was a cool December day, both witnesses noticed that appellant was sweating profusely on his face. Ms. Lambert described him as wearing a black leather jacket, blue jeans, sunglasses, and nice-looking tennis shoes.
After watching appellant walk down Killian Street, Mr. Campos left to get his truck so that he could continue to follow appellant. He drove around the area for a time; then he saw appellant enter a building on Zelzah. Mr. Campos parked and watched the building to see if appellant would emerge. When he did not, Mr. Campos drove back toward Killian to see if the police were responding. He encountered the police on Killian Street and flagged them down.
The police officers drove Mr. Campos back to Zelzah, where they found appellant walking down a street in the area. Appellant was identified by Mr. Campos and arrested. Appellant told the officers his name was "Danny Rodriguez."
Jack Reade testified that he had locked the doors and windows of his apartment when he left at 8 a.m. on the morning of December 16. He testified that his apartment is a little chaotic, and that he could not see anything missing when he returned that afternoon and learned of the incident from Ms. Lambert. Mr. Reade had not given appellant permission to enter his apartment.

B
Appellant was charged by information with one count of first degree (residential) burglary (§§ 459/460, subd. (a)). The information also alleged *242 that he had suffered a prior conviction on August 29, 1988, for a serious felony, burglary, within the meaning of section 667, subdivision (a); that he had served a prior term of imprisonment for this offense within the meaning of section 667.5; and that he had failed to remain free of custody for five years, within the meaning of section 667.5, subdivision (b). A second prior conviction for burglary within the meaning of section 667.5 on May 25, 1982, was also alleged.
The jury convicted appellant of first degree residential burglary. Appellant waived jury on the prior conviction allegations, and the trial court found them to be proven. The court imposed the high term of six years on the burglary count; an additional five years pursuant to section 667, subdivision (a); and one year pursuant to section 667.5, subdivision (b) with respect to the 1982 conviction, for an aggregate term of twelve years. The one-year enhancement for the 1988 prior conviction was stayed. Appellant was ordered to pay a restitution fine of $1,000. He filed a timely notice of appeal.

DISCUSSION

I


Jury Instructions[*]
.... .... .... .... .... .... .... .

II

Sentencing
Appellant presents five claims of sentencing error, and respondent presents one. We address the first in the published portion of this opinion.

A. Enhancement for 1982 Prior Term of Imprisonment

(1) Appellant argues that the trial court should not have imposed a one-year enhancement under section 667.5, based on a prison term served as a result of appellant's 1982 burglary conviction. Appellant argues the court erred because he did not serve a term of imprisonment for the 1982 offense *243 within the meaning of section 667.5, subdivision (b). The basis for this claim is that appellant was transferred by the Department of Corrections to the California Rehabilitation Center and was at that facility for some part of his term of imprisonment. It is established that a direct commitment of an inmate by the trial court to the California Rehabilitation Center does not result in a prior prison term within the meaning of section 667.5, subdivision (b). The Attorney General argues that the enhancement in this case was proper, nevertheless, under subdivision (d).[2]
Section 667.5, subdivision (d) does not bear on the question. In In re Kelly (1983) 33 Cal.3d 267 [188 Cal. Rptr. 447, 655 P.2d 1282], the Supreme Court explained that this provision "is relevant solely to subdivisions (a) and (b) in determining whether ten or five years has passed since a defendant had been `free' of `custody'...." (Id. at p. 274.) Appellant makes no argument regarding the washout provisions of subdivisions (a) and (b).
We have found no reported decisions, and are cited to none, which present the procedural history we confront in this case. Appellant relies upon cases that hold a civil commitment to the California Rehabilitation Center (CRC) does not result in a prior prison term because the commitment is for rehabilitation rather than punishment. (See People v. Shoals (1992) 8 Cal. App.4th 475, 501 [10 Cal. Rptr.2d 296]; People v. Lara (1979) 95 Cal. App.3d 247, 249-250 [158 Cal. Rptr. 847].)
Appellant's argument that his confinement at CRC was pursuant to Welfare and Institutions Code section 3051 is based on an entry in the chronological record of the Department of Corrections. The record reflects that appellant was "Rec'd CRC" on October 25, 1982. But the record also shows *244 that he was sentenced by the trial court to a term of imprisonment under the jurisdiction of the Department of Corrections, and was not civilly committed to the CRC pursuant to Welfare and Institutions Code section 3051. The abstract of judgment for the 1982 offense establishes that the trial court immediately imposed sentence upon appellant, rather than suspending execution of the sentence and ordering the district attorney to file a petition for commitment of the defendant to a rehabilitation facility pursuant to Welfare and Institutions Code section 3051. In other words, it was the trial court's determination that appellant should be punished for the 1982 offense. (See § 1170, subd. (a).) His transfer to the CRC was apparently a decision made by the Department of Corrections pursuant to sections 5080 and 5003, subdivision (j).
If we were to accept the position advanced by appellant, it would follow that any prisoner who was able to obtain a transfer to CRC by the Department of Corrections, however brief, would be able to avoid the prior prison term enhancement of section 667.5. We do not believe this is what the Legislature intended in enacting the recidivist provisions of the Determinate Sentencing Act. (See People v. Jones (1993) 5 Cal.4th 1142, 1147 [22 Cal. Rptr.2d 753, 857 P.2d 1163]; People v. Prather (1990) 50 Cal.3d 428, 439-440 [267 Cal. Rptr. 605, 787 P.2d 1012]; People v. Walkkein (1993) 14 Cal. App.4th 1401, 1410 [18 Cal. Rptr.2d 383].) As we have observed, this case is distinguishable from those in which the trial court has ordered that a defendant should be given an opportunity for rehabilitation at CRC under Welfare and Institutions Code section 3051. We conclude that the time spent in CRC does not exempt appellant from an enhanced sentence under section 667.5 for this period of incarceration.
We reach the same conclusion by examination of subdivision (h) of section 667.5, which defines "prison term" within the meaning of that statute. The subdivision provides: "Serving a prison term includes any confinement time in any state prison or federal penal institution as punishment for commission of an offense, including confinement in a hospital or other institution or facility credited as service of prison time in the jurisdiction of the confinement." The availability of credit to an inmate directly confined to CRC by the trial court pursuant to Welfare and Institutions Code section 3051 turns on the meaning of the Welfare and Institutions Code sections governing confinement for treatment of addiction, as read with the Penal Code provisions regarding credit.
Welfare and Institutions Code section 3201, subdivision (c), sets out a formula for calculating the duration of commitment for an inmate sent to *245 CRC by the trial court pursuant to Welfare and Institutions Code section 3051. The statute expressly states that the term includes "application of good behavior and participation credit" under Penal Code article 2.5 (commencing with § 2930).
Section 2933 was enacted in 1982 as part of the same legislation. (People v. Madison (1993) 17 Cal. App.4th 783, 787 [22 Cal. Rptr.2d 157].) It provides: "It is the intent of the Legislature that persons convicted of a crime and sentenced to state prison, under Section 1170, serve the entire sentence imposed by the court, except for a reduction in the time served ... for performance in work, training or education programs established by the Director of Corrections." The credit provisions were extensively reviewed in People v. Madison, supra, 17 Cal. App.4th 783, 787-788. In that case, the court concluded that no credits are available under section 2931 because that statute is limited by amendments enacted in 1982 to offenses committed on or before January 1, 1983. (§ 2931, subd. (d); Stats. 1982, ch. 1234, § 2, p. 4548.) The Madison court held that the section 2933 "worktime" credit provisions do not apply to CRC inmates, in part because the Welfare and Institutions Code was not amended to specifically allow for them when section 2933 was enacted. (17 Cal. App.4th at pp. 788-789.)
The Madison analysis does not apply to this case for two reasons. First, the offense for which appellant was committed to CRC in 1982 occurred before the effective date of the amendment to section 2931. That amendment did not deprive appellant of a right to credit under that statute. Second, since appellant was not committed to CRC pursuant to the Welfare and Institutions civil commitment procedure, he did not come within the restrictive terms of Welfare and Institutions Code section 3201, subdivision (c). It follows that he was entitled to the same section 2933 credits that are available to any other inmate confined pursuant to section 1170. Since he was eligible for credit for the term of his 1982 confinement at CRC, he was "serving a prison term" within the meaning of section 667.5, subdivision (h). Because that is true, he was subject to the one-year enhancement of section 667.5, subdivision (b) upon his conviction of another felony.

B.-F.[*]
.... .... .... .... .... .... .... .


*246 DISPOSITION
The judgment is modified to strike the one-year enhancement imposed for the 1988 prior conviction and to reflect one hundred fifty days of presentence credit. As so modified, the judgment is affirmed.
Hastings, J., and Klein (Brett), J.,[**] concurred.
Appellant's petition for review by the Supreme Court was denied July 13, 1994.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for partial publication with the exception of parts I and II B through F.
[*]   Judge of the Municipal Court for the Los Angeles Judicial District sitting under assignment by the Chairperson of the Judicial Council.
[2]  In pertinent part, section 667.5 provides: "(b) [W]here the new offense is any felony for which a prison sentence is imposed, in addition and consecutive to any other prison terms therefor, the court shall impose a one-year term for each prior separate prison term served for any felony; ... [¶] (d) For the purposes of this section, the defendant shall be deemed to remain in prison custody for an offense until the official discharge from custody or until release on parole whichever first occurs including any time during which the defendant remains subject to reimprisonment for escape from custody or is reimprisoned on revocation of parole. The additional penalties provided for prior prison terms shall not be imposed unless they are charged and admitted or found true in the action for the new offense. [¶] (g) A prior separate prison term for the purposes of this section shall mean a continuous completed period of prison incarceration imposed for the particular offense alone or in combination with concurrent or consecutive sentences for other crimes, including any reimprisonment on revocation of parole which is not accompanied by a new commitment to prison, and including any reimprisonment after an escape from incarceration. [¶] (h) Serving a prison term includes any confinement time in any state prison or federal penal institution as punishment for commission of an offense, including confinement in a hospital or other institution or facility credited as service of prison time in the jurisdiction of the confinement."
[*]   See footnote, ante, page 238.
[**]   Judge of the Municipal Court for the Los Angeles Judicial District sitting under assignment by the Chairperson of the Judicial Council.
