
122 Wis.2d 765 (1985)
364 N.W.2d 553
STATE of Wisconsin, Plaintiff-Respondent,
v.
Herman O. NYBORG, Defendant-Appellant.
No. 84-226-CR.
Court of Appeals of Wisconsin.
Submitted on briefs December 6, 1984.
Decided January 28, 1985.
*766 For the defendant-appellant the cause was submitted on the brief of Herman O. Nyborg, pro se, of Waupun.
For the plaintiff-respondent the cause was submitted on the brief of Bronson C. La Follette, attorney general, and Stephen W. Kleinmaier, assistant attorney general.
Before Gartzke, P.J., Bablitch, J., and Dykman, J.
GARTZKE, P.J.
Herman Nyborg appeals from a postconviction order by the circuit court for Rock County denying him more than 50 days credit on his sentence for endangering safety by conduct regardless of life, sec. 941.30, Stats. The issues Nyborg raises in his pro se brief are (1) whether he is entitled to an additional credit for the 268 days he spent in the LaFayette County *767 jail on an unrelated sentence because Rock County filed a detainer; (2) whether the Rock County circuit court should have considered his presentence confinement when sentencing him; and (3) whether the extra good time statute, sec. 53.12(1), Stats. 1981-82,[1] which applies to prison inmates, denies equal protection of the laws to persons confined in county jail for inability to post bail. We resolve the issues against Nyborg and therefore affirm.
The facts are undisputed. February 23 to March 3, 1982 Nyborg was held in the Rock County jail, pending trial on charges of endangering safety and resisting an officer, secs. 941.30 and 946.41 (1), Stats. He was released on bail March 3, but was jailed in LaFayette County July 21, 1982 on what he describes as an unrelated matter. Rock County filed a detainer with LaFayette County September 20, 1982. April 5, 1983 LaFayette County released Nyborg and turned him over to Rock County, where he pled guilty to the endangering safety charge April 6, 1983. He remained in the Rock County jail until sentenced May 16, 1983, to three years on the endangering safety charge. The sentence was stayed and probation ordered.
October 6, 1983, Nyborg was arrested for violating probation and was again confined in the Rock County jail. His probation was revoked December 7, 1983. The next day he was transported to the state prison. The Department of Health and Social Services gave him credit for this period of confinement.
Nyborg moved the Rock County circuit court for sentence credit, sentence modification and a declaration that sec. 53.12(1), Stats., is unconstitutional. The court credited *768 him with an additional fifty days for his time in custody from February 23 to March 3, 1982, and from April 5 to May 16, 1983. It denied his request for sentence modification and held that sec. 53.12(1) is constitutional. Nyborg appeals.
1. Credit for Presentence Confinement
[1]
We reject Nyborg's contention that because Rock County filed a detainer while he was in the LaFayette County jail, he is entitled to sentence credit for his time in the LaFayette County jail, July 21, 1982, to April 5, 1983.
[2]
No basis whatever exists for Nyborg's claim for credit before September 20, 1982. Section 973.155 (1) (a), Stats., provides in relevant part that "[a] convicted offender shall be given credit toward the service of his or her sentence for all days spent in custody in connection with the course of conduct for which sentence was imposed." Nyborg was jailed in LaFayette County July 21, 1982 but on a charge having nothing to do with the endangering safety sentence. The detainer itself was not filed by Rock County until September 20, 1982.
Turning to the period from September 20, 1982, when the detainer was filed, until his release to Rock County on April 5, 1983, we conclude that Nyborg is not entitled to credit for that time under sec. 973.155(1) (a), Stats. We held in State v. Demars, 119 Wis. 2d 19, 26, 349 N.W.2d 708, 711-12 (Ct. App. 1984), that if a county files a detainer in another county in which a defendant is confined, the defendant is not in custody in connection with the course of conduct for which sentence is imposed in the demanding county until his custody is surrendered to that county.
2. Consideration for Presentence Confinement
Nyborg argues that his sentence should be modified because the Rock County court did not consider his pretrial *769 confinement. He acknowledges that a sentence once imposed cannot be modified unless a "new factor" affecting the sentencing determination exists, State v. Macemon, 113 Wis. 2d 662, 668, 335 N.W.2d 402, 406 (1983), but asserts that all the time he spent in the LaFayette and Rock County jails constitutes a "new factor." We disagree.
[3]
According to State v. Walker, 117 Wis. 2d 579, 586, 345 N.W.2d 413, 416 (1984), presentence confinement may create the right to a mandatory credit against a sentence, but it is not a factor which the trial court must consider when exercising sentencing discretion. If the trial court need not consider presentence confinement when imposing sentence, it need not consider that confinement when asked to modify the same sentence.
3. Equal Protection of the Laws
The extra good time statute, sec. 53.12(1), Stats., provides,
In addition to the credit for good conduct prescribed in s. 53.11, every inmate whose diligence in labor or study surpasses the general average is entitled to a diminution of time at the rate of one day for each 6 days during which he shows such diligence. The diminution shall be made under the rules of the department.
Nyborg contends that sec. 53.12(1), Stats., unconstitutionally discriminates against a person who because of inability to post bail is held in county jail before being confined in a state prison. He also contends that denial of extra good time to a jail inmate has no rational basis. He concludes that the statute denies him equal protection of the laws, contrary to the fourteenth amendment to the United States Constitution. We disagree.
Equal protection analysis begins with noting that the challenger of a statutory classification must prove an abuse of legislative discretion beyond a reasonable doubt. *770 Sambs v. City of Brookfield, 97 Wis. 2d 356, 370, 293 N.W.2d 504, 511, cert. denied, 449 U.S. 1035 (1980).
We next identify the challenged classes. Nyborg contends that sec. 53.12(1), Stats., creates one class consisting of inmates who serve their entire sentences in state prisons and another class of inmates who were confined in county jail for inability to post bail and then confined in a state prison. Members of the first class may earn extra good time during their entire sentence. Although members of the second class must receive credit against their sentence for time spent in the county jail, Klimas v. State, 75 Wis. 2d 244, 248, 249 N.W.2d 285, 287 (1977),[2] they do not earn extra good time while confined in county jail. Members of the first class may therefore earn more extra good time than those in the second class.
New York inmates unsuccessfully made the same equal protection argument in McGinnis v. Royster, 410 U.S. 263 (1973). New York denied its prisoners good time credit for the period of their presentence confinement in a county jail in computing the minimum parole date but gave those out on bail before sentence good time credit for the entire period they ultimately spent in custody. 410 U.S. at 268. The McGinnis court held that for purposes of equal protection analysis, only some rational basis is necessary to sustain classifications for purposes of computing good time. 410 U.S. at 270. The court concluded that because significant differences existed between prisons and county jails, it was reasonable not to award good time for pretrial detention in a jail. 410 U.S. at 270-73. The New York state prisons had rehabilitation as a prime purpose and were equipped with *771 educational and vocational services. The county jails were primarily detention centers and were not equipped to provide educational and vocational services.
[4]
In this state, extra good time is granted "to provide an incentive to [prison] inmates in approved work and study programs to develop and reinforce positive behavior, and to promote institutional order." Wis. Adm. Code sec. HSS 302.27(1). It is undisputed that our state prisons have educational and work programs and our county jails have few. As in McGinnis, this difference is significant and is a rational basis for distinguishing between persons who serve their entire sentence in prison and those who serve part of their sentence in county jails. McGinnis, 410 U.S. at 271.
[5]
We reject Nyborg's argument that because some prison inmates receive sec. 53.12(1), Stats., credit but do not participate in work and study programs, the challenged classification is irrational. The inmate who cannot participate in a work or study program earns extra good time under certain conditions, Wis. Adm. Code sec. HSS 302.27(1) (b)-(i), such as being "involuntarily unassigned" to a program. Sec. HSS 302.27(1) (b).[3] Rewarding willingness to participate in programs is consistent with the goals expressed in HSS 302.27(1), even if the inmate is unable to participate. We conclude that the classification in sec. 53.12(1) has a rational basis.
*772 [6]
Accordingly, the trial court properly concluded that sec. 53.12(1), Stats., does not deny equal protection of the laws.
Nyborg having failed to show that the circuit court erred in its postconviction order, we must affirm it.
By the Court.Order affirmed.
DYKMAN, J. (concurring).
There is no evidence in this record that some prison inmates receive sec. 53.12 (1), Stats. (1981-82) credit but do not participate in work and study programs. The majority therefore should not address the constitutional issue raised by Nyborg. Were I to address the issue, I would not reach the majority's result.
The groups to be considered for the purpose of an equal protection analysis are:
(1) Jailed inmates who want to participate in work or study programs but are not permitted to do so.
(2) Imprisoned inmates who want to participate in work or study programs but are not permitted to do so.
The only difference between the two categories is the place of incarceration. Both groups want to participate in work or study programs which will give them extra good time. Neither group participates in the programs. Those imprisoned receive extra good time. Those jailed do not. I find no rational basis in this classification.
NOTES
[1]  Section 53.12(1), Stats., was repealed by sec. 3, 1983 Wis. Act 66, effective June 1, 1984. All references to that section are to Stats. 1981-82.
[2]  The Klimas court held that presentence confinement resulting from indigency must be credited against the sentence as time served. 75 Wis. 2d at 248, 249 N.W.2d at 287. Presentence confinement, however, is not time served for the purpose of calculating good time credit. Mitchell v. State, 69 Wis. 2d 695, 699, 230 N.W.2d 884, 886 (1975).
[3]  An inmate under administrative confinement, observation or temporary lockup not resulting from the disposition of a disciplinary charge receives extra good time if the inmate was earning it prior to his or her change in status. Wis. Adm. Code sec. HSS 302.27(1) (c), (d) and (e). The same rule applies if the inmate is at a court appearance, medical or dental appointment, in sickcell status or in hospital placement. Sec. HSS 302.27(1) (g), (h) and (i). An inmate participating in an approved course of study also receives extra good time. Sec. HSS 302.27(1) (f).
