
98 Cal.App.3d 273 (1979)
159 Cal. Rptr. 413
THE PEOPLE, Plaintiff and Respondent,
v.
DAVID ROY SANDERS, Defendant and Appellant.
Docket No. 18496.
Court of Appeals of California, First District, Division Three.
October 31, 1979.
*274 COUNSEL
Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Clifton R. Jeffers, Chief Assistant State Public Defender, Isadora W. Lomhoff and Gary D. Sowards, Deputy State Public Defenders, for Defendant and Appellant.
George Deukmejian, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, Robert R. Granucci, Gloria T. DeHart and Clifford K. Thompson, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
*275 OPINION
WHITE, P.J.
In an information filed in the Superior Court of Napa County defendant and appellant David Roy Sanders was charged with violations of Penal Code section 217 (assault with intent to commit murder) and Penal Code section 245, subdivision (a) (assault with a deadly weapon). Appellant pled not guilty and not guilty by reason of insanity to each count. On the first day of jury trial the court dismissed count one (assault with intent to commit murder) on the prosecutor's motion. The jury found appellant guilty of assault with a deadly weapon. Since both psychiatrists who had examined appellant concluded that he was sane, appellant withdrew his plea of not guilty by reason of insanity. Appellant was sentenced to prison for three years for assault with a deadly weapon plus a two-year enhancement for use of a firearm. Appellant received 121 days of presentence credit on his sentence. Appellant contends on appeal that since the California Supreme Court adopted the American Law Institute (ALI) test for insanity, he should be granted a new trial on the issue of insanity. Appellant also contends on appeal that he is entitled to work time/good time credit for the time he was in presentence custody.
On the morning of February 1, 1978, appellant drove to the California Veterans Home in Yountville and confronted Gary Crabtree, a groundsman at the hospital. After some conversation, Crabtree was observed to raise his hands and wave them in a defensive gesture. Appellant then produced a .22 caliber pistol and shot him. The victim fell to the ground shouting, "`Help, I've been shot,'" and appellant walked away.
Appellant then drove to the Napa County Sheriff's office where he identified himself to Maxine Moody, a clerk, and informed her that he wanted to surrender himself because he had "`just shot someone.'" Moments later appellant informed a dispatcher, Michael Loughran, that his weapon was on the seat of his car. Sergeant Harold Snook recovered the weapon from appellant's car.
The victim recovered but he suffered a severe injury to his right leg and pelvic area.


*276 Insanity

In People v. Drew (1978) 22 Cal.3d 333 [149 Cal. Rptr. 275, 583 P.2d 1318], the California Supreme Court held the M'Naghten test for insanity should no longer be applied and replaced it with the American Law Institute (ALI) test which provides as follows: "`A person is not responsible for criminal conduct if at the time of such conduct as a result of mental disease or defect he lacks substantial capacity either to appreciate the criminality [wrongfulness] of his conduct or to conform his conduct to the requirements of law.'" (Id., at pp. 336-337, fn. 3.) The M'Naghten test provided: "`[T]o establish a defence on the ground of insanity, it must be clearly provided that, at the time of the committing the act, the party accused was labouring under such a defect of reason, from disease of the mind, as not to know the nature and quality of the act he was doing; or, if he did know it, that he did not know he was doing what was wrong.'" (Id., at p. 336, fn. 2.) The ALI test adds a volitional element to the M'Naghten test's exclusive emphasis on cognition. (People v. Wischemann (1979) 94 Cal. App.3d 162, 168 [156 Cal. Rptr. 386]; (People v. Phillips (1979) 90 Cal. App.3d 356, 365 [153 Cal. Rptr. 359].)
The Supreme Court in Drew held, "This decision will apply retroactively only to those cases not yet final in which the defendant has pled not guilty by reason of insanity and to cases that have not yet come to trial as of the date of the finality of this opinion." (People v. Drew, supra, 22 Cal.3d 333, 348.) (1) Appellant contends that since he pled not guilty by reason of insanity, Drew requires remand of this case for a limited new trial on the issue raised by such a plea. On the other hand the People contend that Drew offers no comfort to defendants, who chose not to plead not guilty by reason of insanity, and that appellant placed himself in this class by withdrawing his plea of not guilty by reason of insanity.
We hold that not every defendant who withdraws his plea of not guilty by reason of insanity is entitled to the benefit of Drew. However, Drew does apply to the instant case. The trial court appointed three psychiatrists to examine appellant pursuant to Penal Code sections 1026 and 1027. Two of the psychiatrists examined appellant and submitted reports to the court. Each of these psychiatrists determined that appellant knew the difference between right and wrong. Because of these reports, appellant, after the jury found him guilty of assault with a *277 deadly weapon, withdrew his plea of not guilty by reason of insanity. For purposes of receiving the benefit of the change in the law, appellant is in substantially the same posture as any defendant who lacked sufficient evidence to convince a jury of his insanity under the M'Naghten test. It would be inequitable to treat appellant more harshly because counsel sought to conserve judicial resources rather than what, in light of the preliminary psychiatric reports, would have been an unsuccessful M'Naghten defense.
Appellant should be distinguished from a defendant who withdraws his plea of not guilty by reason of insanity before psychiatrists or psychologists have been appointed to examine the defendant and have in fact examined the defendant and submitted reports. Under Drew the failure to apply the ALI test is not reversible per se. The function of the reviewing court is to examine the record and to determine whether the error was prejudicial under the California Constitution, article VI, section 13; to wit, whether it is reasonably probable a different result would have been reached under the ALI test. (People v. Wischemann, supra, 94 Cal. App.3d, 162, 168-169; People v. Phillips, supra, 90 Cal. App.3d 356, 365-366.) This function cannot be performed by the reviewing court unless the record contains some evidence of a defendant's mental condition. If the record does contain the reports of psychiatrists who have been appointed to examine a defendant, this function may be performed. Under such circumstances a defendant is entitled to the benefits of Drew.
Our function now becomes to determine whether appellant might have been successful on a plea of not guilty by reason of insanity under the ALI test. One of the psychiatrists who examined appellant concluded, "In my opinion, this individual was sane at the time of the above offense, that he knew the difference between right and wrong and that he was able to adhere to the right." Under this psychiatrist's opinion appellant would be sane under the ALI test. The other psychiatrist, Dr. Robert Wyckoff, who examined appellant concluded, "This patient is not psychotic and is not `Insane' nor was he `Insane' at the time of the offense as such term is used in the relevant statutes. His dissociation from the offense does indicate that he is not a violent person and that it is not likely that he would again act out violently." In view of the fact that Drew was decided subsequent to Dr. Wyckoff's preparation of his report, it is not surprising that the report is structured in terms of the M'Naghten test. However, Dr. Wyckoff stated in his report that appellant described his commission of the offense in terms of being physically *278 and mentally dissociated from it.[*] Dr. Wyckoff's conclusion clearly indicates that he was convinced of appellant's sincerity when appellant suggested that he was dissociated from the crime. His conclusion further shows that he thought appellant's conduct was not in line with his personality. Dr. Wyckoff might well have concluded that appellant could not "conform his conduct to the requirements of law." If Dr. Wyckoff had reached such a conclusion, there would be differing opinions of the expert witnesses which would have presented a fact situation for the jury. Since there is some evidence that appellant lacked volitional capacity under the ALI test, the case must be reversed and remanded for a new trial on the issue of insanity.

Work Time/Good Time Credit
(2) Appellant contends that he is entitled to work time/good time credit of 40 days on his prison term for the 121 days he spent in presentence custody.
Under Penal Code section 2900.5, as amended effective June 28, 1978, a defendant is entitled to credit on his term of imprisonment not only for the number of days actually spent in presentence custody, but also for the number of days "credited to the period of confinement pursuant to [Penal Code] Section 4019." If a defendant comes within section 4019 he is entitled, for each six-day period that he is confined in county jail (or other specified facility), to one day for work time and one day for good time "unless it appears by the record" that he either "has refused to satisfactorily perform labor as assigned" or "has not satisfactorily complied with the reasonable rules and regulations." (Pen. Code, § 4019, subds. (b) and (c).)
On its face section 4019 of the Penal Code does not apply to presentence custody of defendants convicted of a felony and sentenced to state prison. Section 4019 does apply to presentence custody of defendants convicted of a misdemeanor and sentenced to county jail. Sections 2930-2932 of the Penal Code, which became effective on July 1, 1977, provide that a defendant charged with a crime, who makes bail, is tried, convicted of a felony and sentenced to prison, will get work time/good time credit against his full sentence. Therefore, it is only the defendant *279 who is in custody before being sentenced to prison who is denied a reduction of his full sentence by work time/good time credit, because he is denied any work time/good time credit for his presentence confinement. In order to avoid a construction of Penal Code section 4019 which would deny defendants equal protection of the law, we hold that section 4019 entitles all defendants, whether sentenced eventually to county jail or to state prison, to presentence work time/good time credit as described in section 4019, subdivisions (b) and (c). To hold otherwise would mean that a defendant who makes bail, is convicted, goes to state prison, and receives work time/good time credit against his entire term of imprisonment is in a much better position than his poorer counterpart who cannot make bail but is eventually convicted of a felony and sent to prison and denied presentence work time/good time credit.
The judgment is affirmed insofar as it adjudicated appellant's guilt. The cause is remanded to the trial court with directions to allow appellant to reinstate his plea of not guilty by reason of insanity. The trial court is further directed to recompute appellant's work time/good time credit in accordance with the views herein expressed.
Scott, J., and Feinberg, J., concurred.
Respondent's petition for a hearing by the Supreme Court was denied January 8, 1980.
NOTES
[*]   Dr. Wyckoff stated his impression of appellant as follows: "Schizoid personality and some hysterical repression."
