
174 Cal.App.4th 175 (2009)
___ Cal.Rptr.3d ___
THE PEOPLE, Plaintiff and Respondent,
v.
SHELTON BRYANT, Defendant and Appellant.
No. B205295.
Court of Appeals of California, Second District, Division Five.
May 22, 2009.
*177 Jennifer Peabody, under appointment by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Pamela C. Hamanaka, Assistant Attorney General, Keith H. Borjon and John R. Gorey, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
TURNER, P. J.

I. INTRODUCTION
Defendant was committed to the state hospital pursuant to Penal Code[1] section 1370, subdivision (a)(1)(B). On May 21, 2007, two psychiatrists, a psychologist, and a program assistant at Patton State Hospital signed a report prepared pursuant to section 1370, subdivision (b)(1). The report recommended defendant be returned to superior court as he was competent to stand trial. However, it was not until more than two months later on July 27, 2007, pursuant to section 1372, subdivision (a)(1), that the designee of the medical director at Patton State Hospital certified defendant was competent to stand trial. Normally, an accused is not entitled to section 4019 presentence conduct credits for time spent in the state mental hospital against a subsequent sentence. This is because the period of confinement while the accused is hospitalized is not considered punitive. Here, we discuss when defendant became entitled to conduct creditson May 21, 2007, when the hospital staff unanimously reported he was competent to stand trial or later on July 27, 2007, when the section 1372, subdivision (a)(1) medical certification was mailed to the trial court. In light of the uncontradicted evidence defendant was competent as of May 21, 2007, he is entitled to conduct credits from that date against the sentence imposed after he was found in violation of a grant of probation.

II. PROCEDURAL BACKGROUND
On March 3, 2006, defendant pled guilty to charges of felony stalking and misdemeanor battery on a cohabitant before the Honorable Barbara R. Johnson. (§§ 646.9, subd. (a), 243, subd. (e)(1).) At that time the imposition *178 of sentence was suspended; defendant was placed on probation for three years; and he was given presentence custody credit for 170 days, including 114 days of actual custody and 56 days' behavior credits. Judge Johnson imposed various orders and imposed certain probation conditions.
On October 17, 2006, the prosecution filed a motion requesting revocation of defendant's probation based upon his October 13, 2006 arrest. As a result of that arrest, defendant was charged in Los Angeles Superior Court case No. BA310935 with attempted kidnapping (§§ 207, 664); criminal threats (§ 422); inflicting corporal injury on spouse or cohabitant (§ 273.5, subd. (a)); and stalking (§ 646.9, subd. (b)). Defendant's probation in this case was then revoked.
On December 5, 2006, the case was now before the Honorable Anne H. Egerton who declared a doubt as to defendant's mental competence pursuant to section 1368, subdivision (a).[2] Criminal proceedings were adjourned. Dr. Jack Rothberg was appointed to examine defendant. In a report dated December 20, 2006, Dr. Rothberg stated: defendant, who was highly paranoid and suffered from delusional ideas, refused to be interviewed; the refusal to be interviewed was "based on a paranoid delusion"; and it was "medically appropriate" defendant's "psychotic condition be treated with medication." Dr. Rothberg concluded: "His behavior is unpredictable. He is likely to misinterpret the motives and actions of others which may result in serious harm to others or to himself. He is a danger to himself only inasmuch as his behavior is likely to be misinterpreted by others who in turn would react against him." Dr. Rothberg acknowledged though there was the potential defendant was malingering: "There is an outside possibility that Mr. Bryant may simply be malingering or simply refusing to cooperate on a non-psychotic basis. If indeed this is the case that will be discerned fairly quickly at Patton State Hospital and he could be returned to court." On February 13, 2007, Judge Egerton found defendant was not competent to stand trial. On the same date, defendant was committed to the State Department of Mental Health for placement in the state hospital pursuant to section 1370, subdivision (a)(1)(B)(i)[3] until such time as his mental competency was restored. *179 Judge Egerton stated defendant's confinement could not exceed four years. Judge Egerton indicated defendant had previously been given credit for 170 days and was entitled to 126 additional actual days and 62 days' conduct credits for a total of 358 days.
On May 21, 2007, an assessment of defendant's mental state was prepared pursuant to section 1370, subdivision (b)(1). Section 1370, subdivision (b)(1) requires the medical director of the state hospital report to the trial court concerning the defendant's progress towards mental competency.[4] The May 21, 2007 report consisted of an ultimate opinion concerning defendant's mental competency; forensic data; a Diagnostic and Statistical Manual of Mental Disorders diagnosis; an analysis of his current physical problems and medications; a discussion of defendant's clinical progress and the rationale for the recommendation; a section entitled "OPINION THAT DETERMINES DISCHARGE READINESS"; an analysis of special high-risk behaviors; and a recommendation that defendant be returned to superior court for trial.
Page 1 of the May 21, 2007 report states its ultimate opinion concerning defendant's competency is as follows: "We recommend that the above-named individual be returned to court as competent to stand trial pursuant to PC 1372. We have considered the possible recommendation of PC 1372(e) and do not believe that recommendation is indicated at this time." At the conclusion of the report to Judge Egerton, the exact same words appear under the heading "RECOMMENDATIONS."
*180 The May 21, 2007 report then set forth a comprehensive analysis of defendant's mental and physical condition. After reviewing the charges, the report, with reference to the Diagnostic and Statistical Manual of Mental Disorders, diagnosed defendant as suffering from alcohol and cannabis dependence in a controlled environment. The report states, "There is no evidence to support any diagnosis involving psychosis, a mood disorder, or any other Axis I or Axis II disorder." In the clinical progress and rationale for the recommendation portions of the report, it is recommended defendant be returned to court because he was competent to stand trial. The staff indicated: upon admission to the hospital, defendant received a "comprehensive, multidisciplinary assessment" designed to render a diagnosis and design a treatment plan; upon admission, there were no symptoms of psychosis present; there was no evidence of any "hallucinations, delusions, thought disorder or mood disorder"; nor was there any evidence during any part of his hospitalization of any "impairment in attention, concentration, memory or executive functioning"; and he did not trust the court although the level of distrust was "not beyond that observed by many non-psychotic defendants" or those who are not mentally ill. At first, defendant did not want to speak with the "alienist." But in refusing to do so, defendant did not know he would be found to be incompetent. Defendant was dissatisfied with the services provided by defense counsel. But according to the May 21, 2007 report, there was no evidence of paranoia regarding defense counsel or Judge Egerton.
Defendant was consistently pleasant and cooperative with staff and presented no behavior problems. None of the symptoms which led to the finding of defendant's incompetency to stand trial were observed by the hospital staff. Defendant's substance abuse was being controlled through incarceration and hospitalization. According to the May 21, 2007 report: "He now has a good understanding of the judicial process and the behavior expected of him. He is willing to behave in appropriate ways in future evaluations and legal proceedings. . . . He understands the importance in working closely with defense counsel and has agreed to do so." In the view of the hospital staff, defendant possessed the capacity to rationally cooperate with counsel. Defendant was aware of the charges and evidence against him and their role in the criminal litigation process. At another point in the May 21, 2007 report, defendant was described as having a "rational and factual understanding" of the pending judicial proceedings. The report noted defendant understands the pending charges; what a felony charge is and, as a result, he could spend a substantial amount of time in state prison; the plea bargaining process; the difference between a bench and jury trial; "the roles of the judge, prosecuting attorney and defense attorney"; and the behavior expected of him in the courtroom. The staff further believed defendant had the ability to behave appropriately.
*181 In terms of high-risk behaviors, the May 21, 2007 report stated defendant denied having any suicidal or self-harm ideations. While at Patton State Hospital, defendant had engaged in no suicidal or self-harm behaviors and had no history of ever having done so. Although the pending charges involved danger to others, while at the hospital, defendant had not engaged in any dangerous behaviors. No special precautions were warranted because defendant presented no danger to himself or others. Moreover, defendant was receiving no special medications and there were no conditions which warranted him receiving any. When the May 21, 2007 report was sent to Judge Egerton, she was sitting by assignment in Division Eight of this appellate district.
On July 27, 2007, Dr. Gnanamuthu executed a certification of mental competence pursuant to section 1372, subdivision (a)(1).[5] Dr. Gnanamuthu's certification stated in part: "This defendant has been under treatment and observation since the date of admission to the hospital. It is the consensus of the Clinical Staff and the Medical Director of the hospital that the defendant is now able to understand the nature of the charge . . . and can cooperate with the attorney in [the] subject's defense. [¶] In accordance with Section 1372 . . ., I hereby certify that said defendant is now mentally competent. [¶] Please authorize a hearing in this matter. A speedy trial is important for maintenance of trial competency. [¶] . . . The Court is respectfully requested to notify the Sheriff to return the defendant to your jurisdiction within ten . . . days." Attached to Dr. Gnanamuthu's certification was the May 21, 2007 report which found defendant was competent to stand trial and recommended that he be returned to the trial court.
On August 13, 2007, Judge Egerton, in defendant's absence as he was still at Patton State Hospital, stated she had received a "report" that found he was *182 now competent to stand trial and proceed with probation revocation proceedings. On August 28, 2007, defendant appeared in court and he was competent to proceed with the probation revocation hearing and trial. Proceedings were reinstated.
On October 30, 2007, the prosecutor moved to dismiss the new charges in case No. BA310935. A formal probation violation hearing was scheduled. On November 20, 2007, the probation violation hearing was held before the Honorable Drew E. Edwards. Defendant was found to be in violation of his probation. Defendant's probation was revoked. Defendant was sentenced to two years as to count 1 and a concurrent term of one year as to count 2. Defendant was given a total of 626 days presentence credit, including 335 actual days in county jail; 166 days' conduct credit; and 125 days at Patton State Hospital. Defendant filed a notice of appeal on December 21, 2007.

III. DEFENDANT IS ENTITLED TO CONDUCT CREDITS FROM MAY 21, 2007
(1) Defendant argues he is entitled to conduct credits from May 21, 2007the date of the first report sent to Judge Egerton attesting to his competency to stand trial. Typically, an accused awaiting trial is not statutorily entitled to conduct credits for time spent in a state hospital while subject to a finding of incompetency. (People v. Waterman (1986) 42 Cal.3d 565, 569 [229 Cal.Rptr. 796, 724 P.2d 482]; People v. Sage (1980) 26 Cal.3d 498, 502-503 [165 Cal.Rptr. 280, 611 P.2d 874].) However, our Supreme Court has explained that the Courts of Appeal have held equal protection principles may require a pretrial detainee receive conduct credits for time spent in a nonpenal facility: "Section 4019 provides that its formula for good behavior credit applies to persons detained, prior to felony sentencing, in specifically enumerated local facilities, including `county jail[s], industrial farm[s], or road camp[s] or . . . city jail[s], industrial farm[s], or road camp[s].' (Id., subd. (a)(4), italics added.) The statute does not apply to presentence time spent receiving treatment `in [such] nonpenal institutions . . . as state hospitals.' (People v. Sage[, supra,] 26 Cal.3d 498[ at pp. 502-503].) However, it has been held that equal protection requires application of section 4019 credits to presentence confinement in a state facility if the circumstances of the confinement are essentially penal. (See People v. Guzman (1995) 40 Cal.App.4th 691, 693-695 [47 Cal.Rptr.2d 53] [person diverted, prior to sentencing, for treatment at California Rehabilitation Center (CRC), *183 but later excluded from CRC as unsuitable, is entitled to § 4019 credits while thereafter still confined at CRC pending sentencing]; see also People v. Nubla (1999) 74 Cal.App.4th 719, 731 [88 Cal.Rptr.2d 265].)" (People v. Buckhalter (2001) 26 Cal.4th 20, 30, fn. 6 [108 Cal.Rptr.2d 625, 25 P.3d 1103].)
The two decisions cited in Buckhalter by our Supreme Court as examples of when equal protection principles may warrant granting conduct credits where they may otherwise not be available, People v. Guzman, supra, 40 Cal.App.4th at pages 693-695 and People v. Nubla, supra, 74 Cal.App.4th at page 731, are instructive in the context of this case. In Guzman, the defendant was excluded from the California Rehabilitation Center on June 1994. But the staff at the California Rehabilitation Center failed to notify the trial court of the exclusion order until August 1994. (People v. Guzman, supra, 40 Cal.App.4th at p. 694.) As in our case, a patient at the California Rehabilitation Center is not entitled to presentence conduct credits. Based on equal protection principles, the Court of Appeal held that the defendant was entitled to conduct credits from the date of exclusion from the California Rehabilitation Center. The Court of Appeal reasoned the rationale for denying conduct credits for time spent in nonpenal institutions is those being treated in such facilities have their own incentives for good behavior; a person who has been excluded from the California Rehabilitation Center, but remains housed there, has no incentive for good behavior apart from the allowance of conduct credit; and the state's concern in encouraging good behavior by a person excluded from the California Rehabilitation Center is identical to its interest in encouraging good behavior on the part of unsentenced county jail inmates. (Id. at p. 695.)
In People v. Nubla, supra, 74 Cal.App.4th at page 731, the defendant was excluded for misconduct from the California Rehabilitation Center on April 10, 1998, but not sentenced until September 26, 1998. The defendant spent a substantial amount of time in the California Rehabilitation Center after his exclusion. The Court of Appeal held that the defendant was entitled to credit from the date of exclusion. The court relied in part upon similar analysis in People v. Rodriguez (1997) 52 Cal.App.4th 560, 565 [60 Cal.Rptr.2d 664] where the committed person was excluded from the California Rehabilitation Center because of a medical condition. In Nubla, the Court of Appeal, citing analysis in Rodriguez, explained: "`[O]nce a formal determination was made that Rodriguez was "not suitable" for CRC, she faced all too familiar administrative delays in arranging transport to the sentencing court and in scheduling a sentencing hearing before the proper sentencing judge. The *184 length of Rodriguez's term of imprisonment should not be adversely affected by the vagaries of inter-county prisoner bus scheduling or changing judicial assignments. She should therefore be awarded custody credits from the time CRC formally notified the court of its determination that she was "not suitable" and referred her for further proceedings on the suspended criminal charges.' [Citation.]" (People v. Nubla, supra, 74 Cal.App.4th at p. 732.) In awarding additional credits, the Rodriguez court held: "This occurred by letter dated April 28, 1995. Appellant should receive worktime credits under section 2933 from the date of the formal notification that she was "not suitable"April 28, 1995to the date of her return to Napa County custody, which is June 4, 1995." (People v. Rodriguez, supra, 52 Cal.App.4th at p. 565.)
(2) The foregoing analysis applies equally to the present case. Defendant was unanimously found by four staff members to be restored to competency on May 21, 2007. But it was not until Dr. Gnanamuthu executed a certification of mental competence pursuant to section 1372, subdivision (a)(1) that the process to return defendant to the county jail, where conduct credits were available, commenced. Section 1372, subdivision (a)(1) expressly requires that, once the accused has regained competency, the medical director of the state hospital or a designee "immediately certify that fact" by filing a certificate of restoration with the committing court. (See fn. 5, ante.) As in the case of a California Rehabilitation Center committed person who is not returned to local custody, equal protection principles warrant defendant be given conduct credits that would have been earned had he been returned to the county jail if a timely restoration certificate had been issued.
(3) We recognize there may be a circumstance where the delay in the issuance of the section 1372, subdivision (a)(1) certification is such that award of conduct credits for time spent in the state hospital is unwarranted. There may be a scenario where there is a disagreement between the medical director or the designee, on one hand, and staff, on the other hand, concerning a patient's competence. Or there may be other circumstances which would support the denial of conduct credits. But there is no evidence of such in this case. There is no evidence of incompetency between May 21, 2007, and July 27, 2007. Finally, our opinion should not be read as a holding that the very instant competency is restored, the right to conduct credits accrues. The Legislature has provided for an orderly process in sections 1371 and 1372 for evaluating patients and returning them to court when their competence is regained. But when the uncontradicted evidence demonstrates the accused's competency was unquestionably regained as of a date certain, as occurred here on May 21, 2007, the defendant is entitled to section 4019 conduct credits even though the section 1372, subdivision (a)(1) certification has not been mailed to the trial court.


*185 IV. DISPOSITION
The judgment is modified to award defendant conduct credit from May 21, 2007, to the date of sentence. The judgment is affirmed in all other respects. Upon remittitur issuance, the trial court is to recompute the conduct credit award and so modify the judgment. The clerk is to then prepare an amended abstract of judgment and forward it to the Department of Corrections and Rehabilitation.
Mosk, J., and Kriegler, J., concurred.
NOTES
[1]  All further statutory references are to the Penal Code.
[2]  Section 1368, subdivision (a) states: "If, during the pendency of an action and prior to judgment, a doubt arises in the mind of the judge as to the mental competence of the defendant, he or she shall state that doubt in the record and inquire of the attorney for the defendant whether, in the opinion of the attorney, the defendant is mentally competent. If the defendant is not represented by counsel, the court shall appoint counsel. At the request of the defendant or his or her counsel or upon its own motion, the court shall recess the proceedings for as long as may be reasonably necessary to permit counsel to confer with the defendant and to form an opinion as to the mental competence of the defendant at that point in time."
[3]  Section 1370, subdivision (a)(1)(B)(i) states: "If the defendant is found mentally incompetent, the trial or judgment shall be suspended until the person becomes mentally competent. [¶] (i) In the meantime, the court shall order that the mentally incompetent defendant be delivered by the sheriff to a state hospital for the care and treatment of the mentally disordered, or to any other available public or private treatment facility approved by the community program director that will promote the defendant's speedy restoration to mental competence, or placed on outpatient status as specified in Section 1600."
[4]  Section 1370, subdivision (b)(1) states in part: "Within 90 days of a commitment made pursuant to subdivision (a), the medical director of the state hospital or other treatment facility to which the defendant is confined shall make a written report to the court and the community program director for the county or region of commitment, or a designee, concerning the defendant's progress toward recovery of mental competence. Where the defendant is on outpatient status, the outpatient treatment staff shall make a written report to the community program director concerning the defendant's progress toward recovery of mental competence. Within 90 days of placement on outpatient status, the community program director shall report to the court on this matter. If the defendant has not recovered mental competence, but the report discloses a substantial likelihood that the defendant will regain mental competence in the foreseeable future, the defendant shall remain in the state hospital or other treatment facility or on outpatient status. Thereafter, at six-month intervals or until the defendant becomes mentally competent, where the defendant is confined in a treatment facility, the medical director of the hospital or person in charge of the facility shall report in writing to the court and the community program director or a designee regarding the defendant's progress toward recovery of mental competence. . . . A copy of these reports shall be provided to the prosecutor and defense counsel by the court."
[5]  Section 1372, subdivision (a) states in part: "(a)(1) If the medical director of the state hospital or other facility to which the defendant is committed, or the community program director, county mental health director, or regional center director providing outpatient services, determines that the defendant has regained mental competence, the director shall immediately certify that fact to the court by filing a certificate of restoration with the court by certified mail, return receipt requested. For purposes of this section, the date of filing shall be the date on the return receipt. [¶] (2) The court's order committing an individual to a state hospital or other treatment facility pursuant to Section 1370 shall include direction that the sheriff shall redeliver the patient to the court without any further order from the court upon receiving from the state hospital or treatment facility a copy of the certificate of restoration. [¶] (3) The defendant shall be returned to the committing court in the following manner: [¶] (A) A patient who remains confined in a state hospital or other treatment facility shall be redelivered to the sheriff of the county from which the patient was committed. The sheriff shall immediately return the person from the state hospital or other treatment facility to the court for further proceedings. [¶] . . . [¶] (C) In all cases, the patient shall be returned to the committing court no later than 10 days following the filing of a certificate of restoration."
