
226 Cal.App.3d 783 (1990)
277 Cal. Rptr. 82
THE PEOPLE, Plaintiff and Respondent,
v.
GROVER RONALD MOORE, Defendant and Appellant.
Docket No. A048558.
Court of Appeals of California, First District, Division Two.
January 2, 1990.
*784 COUNSEL
Shulman, Shulman & Siegel and Corinne S. Shulman for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, John H. Sugiyama, Assistant Attorney General, Ronald E. Niver and David H. Rose, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[]]
OPINION
SMITH, Acting P.J.
Defendant Grover Ronald Moore appeals from a prison sentence imposed upon him following an order revoking his probation. He contends that the sentencing court's failure to grant conduct *785 credits for the time he spent in an alcohol recovery center denied him equal protection under the law. We will conclude that it did not.

BACKGROUND
Defendant was charged with inflicting corporal injury on a spouse or cohabitant in violation of Penal Code section 273.5.[1] Defendant entered a plea of nolo contendere, was found guilty and was sentenced to prison for an upper term of four years. Execution of the sentence was suspended and defendant was placed on probation, subject to certain conditions including one year in county jail, which was later reduced to six months. Defendant's sentence was subsequently modified to reflect that, as a condition of probation, he be released and remanded to the custody of the United Indian Lodge, an alcohol recovery center. Defendant spent 90 days at the center.
Defendant's probation was later revoked and he was committed to state prison for four years. At the time of sentencing, the court granted defendant 293 days of custody credit, based on the time defendant actually spent in jail and at United Indian Lodge. Relying on section 4019, the court granted defendant an additional 101 days of conduct credit for the time he spent in jail. However, the court did not grant defendant any conduct credit for the 90-day period he spent in the alcohol recovery center.

APPEAL

I

Equal Protection
(1a) Defendant claims that the court's failure to award "good time/work time" (conduct) credit for time spent in an alcohol recovery center denied him equal protection of the law. Such credit is not authorized by section 4019, subdivision (a)(3), which only allows the trial court to award it to prisoners "confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm or road camp...." Conduct credit for time spent in nonpenal institutions is not authorized. (People v. Sage (1980) 26 Cal.3d 498, 502-503 [165 Cal. Rptr. 280, 611 P.2d 874].) Since section 4019 does not provide for the type of credit which defendant seeks, we understand his argument to be an assertion that the statute itself is unconstitutional because it violates his right to equal protection under article I, section 7 of the California Constitution and the Fourteenth Amendment to the United States Constitution.
*786 (2a), (1b) "`The concept of the equal protection of the laws compels recognition of the proposition that persons similarly situated with respect to the legitimate purpose of the law receive like treatment.'" (In re Gary W. (1971) 5 Cal.3d 296, 303 [96 Cal. Rptr. 1, 486 P.2d 1201], quoting Purdy & Fitzpatrick v. State of California (1969) 71 Cal.2d 566, 578 [79 Cal. Rptr. 77, 456 P.2d 645, 38 A.L.R.3d 1194].) However, "[t]he first prerequisite to a meritorious claim under the equal protection clause is a showing that the state has adopted a classification that affects two or more similarly situated groups in an unequal manner." (In re Eric J. (1979) 25 Cal.3d 522, 530 [159 Cal. Rptr. 317, 601 P.2d 549], italics original.)
Not all prisoners participate in alcohol rehabilitation programs. Courts admit prisoners to these programs upon a determination "that a just disposition of the[ir] case requires such diagnosis and treatment services as can be provided at a diagnostic facility of the Department of Corrections." (§ 1203.03, subd. (a).) Diagnosis and treatment, not detention, is the main focus of such a commitment. In permitting a court to segregate certain prisoners for treatment of conditions related to alcohol abuse, the Legislature has recognized the dissimilarity of this group from other prisoners. The equal protection clause is not applicable unless the challenged law operates disparately among persons who are under like circumstances. (In re Strick (1983) 148 Cal. App.3d 906, 913 [196 Cal. Rptr. 293]; In re Kotta (1921) 187 Cal. 27, 31 [200 P. 957].) Accordingly, before equal protection comes into play, it must first be demonstrated that persons are similarly situated with respect to the legitimate purpose of a given law. (In re Strick, supra, 148 Cal. App.3d at p. 912.) As noted above, prisoners receiving treatment in alcohol recovery centers are not similarly situated to those incarcerated in penal institutions. Thus, the classification is not subject to an equal protection analysis. (Id., at p. 914.)
Defendant relies on People v. Mobley (1983) 139 Cal. App.3d 320 [188 Cal. Rptr. 583], where the appellate court awarded conduct credit to a defendant for time spent in a drug rehabilitation center, finding that equal protection required such credit even though it was not statutorily authorized. (Id., at p. 323.) However, in that case the defendant was placed in the drug rehabilitation center because he could not afford to post bail. Therefore "equal protection required the granting of conduct credits [for time spent in a drug rehabilitation center] to avoid discrimination based on financial status." (People v. Broad (1985) 165 Cal. App.3d 882, 884 [211 Cal. Rptr. 679], italics added.) Since there is no claim defendant was placed in United Indian Lodge for financial reasons, Mobley is not controlling. (Ibid.)
Although section 4019 is not subject to equal protection scrutiny, it is true that the statute denies prisoners in alcohol recovery centers conduct *787 credit for the period they undergo diagnosis and treatment, while granting such credit to prisoners serving time in penal institutions. It remains to be determined whether the distinction drawn by the Legislature between differently situated prisoners is constitutionally sound.
(2b) While the Constitution does not compel equal treatment of classes of persons where the classification is based on factual differences, it does require that the classification not be arbitrary. (Blumenthal v. Board of Medical Examiners (1962) 57 Cal.2d 228, 232-233 [18 Cal. Rptr. 501, 368 P.2d 101].) However, "[w]ide discretion is vested in the Legislature in making the classification and every presumption is in favor of the validity of the statute; the decision of the Legislature as to what is a sufficient distinction to warrant the classification will not be overthrown by the courts unless it is palpably arbitrary and beyond rational doubt erroneous. [Citations.] A distinction in legislation is not arbitrary if any set of facts reasonably can be conceived that would sustain it." (Bilyeu v. State Employees' Retirement System (1962) 58 Cal.2d 618, 623 [25 Cal. Rptr. 562, 375 P.2d 442].)
(1c) Conduct credit is awarded to prisoners in penal institutions to encourage good behavior. (See People v. Smith (1979) 98 Cal. App.3d 793, 800 [159 Cal. Rptr. 749].) On the other hand, those receiving treatment in alcohol recovery centers have their own incentives for good behavior, including fulfillment of the terms of their probation and avoiding alternate jail time. (People v. Broad, supra, 165 Cal. App.3d at 884, citing People v. Saffell (1979) 25 Cal.3d 223, 234-235 [157 Cal. Rptr. 897, 599 P.2d 92].) In addition, conduct credits are meaningful only within the context of a fixed term. (People v. Duran (1983) 147 Cal. App.3d 1186, 1190 [195 Cal. Rptr. 724].) A prisoner in an alcohol recovery center may not spend a fixed amount of time in treatment, as the term of treatment may be expanded (even beyond the fixed term of his sentence) under section 1203.03, subdivision (h). Thus, we find that a reasonable basis exists for distinguishing between individuals in alcohol recovery centers and those in penal institutions when awarding conduct credits. Since the different treatment of alcohol rehabilitation inmates in section 4019 with respect to conduct credits is not palpably arbitrary or irrational, the statute suffers no constitutional infirmity.

II

ERROR IN CALCULATION[*]
.... .... .... .... .... .


*788 DISPOSITION
The judgment is modified to provide that defendant Moore shall receive 100 days of section 4019 conduct credit. The sentencing court shall prepare an amended abstract of judgment that reflects this modification and forward a certified copy of the amended abstract of judgment to the appropriate authorities. As so modified, the judgment is affirmed.
Benson, J., and Peterson, J., concurred.
NOTES
[]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part II.
[1]  Unless otherwise noted, all further statutory references are to the Penal Code.
[*]   See footnote, ante, page 783.
