
106 Cal.App.3d 426 (1980)
164 Cal. Rptr. 923
In re RONALD WALRATH on Habeas Corpus.
Docket No. 37222.
Court of Appeals of California, Second District, Division Five.
June 2, 1980.
*428 COUNSEL
Glen Mowrer, Jr., Public Defender, and James Crowder, Deputy Public Defender, for Petitioner.
Stanley M. Roden, District Attorney, and Gerald McC. Franklin, Deputy District Attorney, for Respondent.
OPINION
KAUS, P.J.
This petition for writ of habeas corpus presents substantial questions regarding the implementation of Penal Code section 4019,[1] which provides for "good time" and "work time" credits for persons committed to county jails.
*429 Convicted of second degree burglary (Pen. Code, §§ 459, 461), petitioner was on July 24, 1979, sentenced to one year in the county jail. When petitioner was first admitted to jail, the sheriff noted on his records that petitioner was entitled to 60 days of good time credit and 60 days work time credit. A tentative release date, which took the 120 days of credit into account, was set. Petitioner escaped from the county honor farm on September 5, 1979, and surrendered himself four days later. He pleaded guilty to the offense of nonviolent escape from jail (Pen. Code, § 4532) and was sentenced to two months in jail, consecutive to the one-year sentence he was still serving.
After the escape conviction, the Santa Barbara County Sheriff informed petititioner that because the escape constituted a violation of honor farm rules, petitioner would receive no good time credits on either the one year or the 60-day term  a total loss of 70 days good time credit. He was, however, given 45 days of work time credit, a loss of 25 days.[2] Petitioner now urges that the deduction of good time credits for the period of time served after the escape constituted impermissible double punishment; that that deduction was unauthorized by statute; and that the deduction of 70 days good time credit violated equal protection guarantees when compared to similar deductions which may be made in the case of state prison inmates who have escaped (see Pen. Code, § 2931, subds. (b)(1) and (b)(3)). In addition, he argues that he was entitled to certain minimal due process protections  including notice and a hearing  before the credits could be deducted.
*430 Petitioner's initial contention  that the criminal prosecution for the escape bars any disciplinary action by the sheriff  runs head-on into In re Davis (1979) 25 Cal.3d 384, 394 [158 Cal. Rptr. 384, 599 P.2d 690], where the court noted that the fact that an inmate has been administratively disciplined for misconduct does not foreclose later criminal prosecution for the same acts of misconduct. We see no reason why a reversal of the sequence should affect constitutionality.
Petitioner next urges that we should construe Penal Code section 4019 as providing that only credits "earned" before the escape occurred are subject to removal by the sheriff. The critical portion of the statute is subdivision (c): "For each six-day period in which a prisoner is committed to a facility as specified in this section, one day shall be deducted from his period of confinement unless it appears by the record that the prisoner has not satisfactorily complied with the reasonable rules and regulations established by the sheriff, chief of police, or superintendent of an industrial farm or road camp."
The sole authority cited for petitioner's proposition is a Massachusetts case, Wood v. Commissioner of Correction (1973) 363 Mass. 79 [292 N.E.2d 712]. However, Wood dealt strictly with a Massachusetts statute, the history of which convinced the court that the legislature of that state meant to authorize only the deduction of accumulated credits. Based as it was upon the peculiarity of that situation, Wood is of no aid to us in determining the intent of the California Legislature with respect to our own section 4019.
Turning to California and the case at hand, we might observe that if it is proper to make a distinction between preescape and postescape good time, our instinct would be to say that good time, "earned" by good behavior before the escape, cannot be taken away and that the escape can only affect good time not yet "earned."[3] Be that as it may, the real point is that any differentiation between pre- and postescape good time necessarily assumes an "earn as you go" approach to section 4019: that the total commitment is broken up into six-day segments and that after each six-day period in which the inmate behaves himself, one day is deducted from the total sentence.
We find this approach unacceptable. One necessary consequence would be that for acts of misconduct during any given six-day period, however frequent and serious, only one day of credit could be lost. Since the purpose of good behavior credits is to act as an incentive for an inmate *431 not to misbehave, we think it unlikely that the Legislature intended the sheriff to blind himself to the severity or frequency of the misconduct in determining the appropriate sanction.
(1) The most reasonable reading of the statute is that the one-for-six-day provision was meant to be interpreted simply as a ratio. Thus for every six days of the total term to which a person is sentenced, or "committed," he receives one day of credit unless he misbehaves before the end of the term. On a one-year term, the defendant is entitled to sixty days of credit; if there is misconduct, the sheriff may deduct all or any part of this credit, depending on the severity of the misconduct regardless of whether the misconduct occurs at the beginning or the end of the sentence.
We realize that in People v. Smith (1979) 98 Cal. App.3d 793, 800 [159 Cal. Rptr. 749], a two-to-one decision, a majority of the court interpreted section 4019 as providing that a county jail "prisoner is ineligible [for any good time credit] if it appears from the record he has not satisfactorily complied with the reasonable rules and regulations established by the sheriff at all times during his stay in the jail." The disquieting implications of this "all or nothing" interpretation are the opposite of those of the segmental approach implicit in petitioner's argument: even the most trivial violation of jail rules necessarily results in a loss of all credits. Such a rule would destroy all incentive for good behavior as soon as an inmate had talked out of turn.
Given the various choices, the interpretation which we suggest seems the most reasonable: it violates neither the language of the statute, nor its purpose, which is obviously to help the sheriff maintain jail discipline by holding out a carrot for good behavior. By avoiding the arbitrary  if divergent  results of the segmental theory on the one hand and People v. Smith, supra, on the other, the "ratio" approach permits the sheriff to withhold good time credits to the extent that he deems best, taking into account all of the circumstances as they relate to the defendant, the misconduct and relevant conditions in the jail, for the smooth running of which he is, after all, responsible to the electorate.
(2) Applied to this case, our interpretation means that the sheriff had discretion to deduct up to 60 days credit for the "period of commitment" in which the escape took place, i.e., the one-year burglary sentence. However, since the escape sentence constituted a separate period of commitment, no sanctions on that sentence could be imposed for misconduct while petitioner served the burglary sentence. He can, of *432 course, be disciplined for misconduct while serving the escape sentence itself.
(3) Petitioner argues that such a result denies him equal protection of the laws because a state prison inmate who escapes can lose no more than 45 days good time credit from his state prison term. (Pen. Code, § 2931, subds. (b)(1) and (b)(3).) The comparison is, however, misleading because it fails to take into account the totality of loss of freedom to which each "class" is subject. For his conviction of nonviolent escape from county jail, an alternate felony/misdemeanor, the most severe sentence petitioner could have received was a state prison sentence of a year and a day. (Pen. Code, § 4532.) On the other hand, the inmate convicted of nonviolent escape from state prison is guilty of a felony punishable by a range of sixteen months, two years, or three years in state prison. (Pen. Code, § 4530, subd. (b).) Thus viewed, it is clear that the county jail escapee is at no disadvantage.
(4) Finally, petitioner contends that he was entitled to certain procedural safeguards before his good time credits could be deducted. We agree. In Wolff v. McDonnell (1974) 418 U.S. 539 [41 L.Ed.2d 935, 94 S.Ct. 2963], the court held that Nebraska prisoners whose good time credits could be forfeited if they were guilty of violating prison rules were entitled to certain minimal due process safeguards before such credits could be deducted: (1) advance written notice of the claimed violation of prison rules; (2) a hearing at which the prisoner had the right to call witnesses and present evidence, so long as institutional security was not threatened thereby; (3) where necessary because of the prisoner's illiteracy or the complexity of the issues, assistance from other inmates or staff; and (4) a written record of the proceedings, including a statement by the factfinder as to the evidence relied upon and the reasons for the disciplinary action taken. (Id. at pp. 563-566 [41 L.Ed.2d at pp. 954-957].) The liberty interest involved here is, for practical purposes, identical to that which, according to Wolff, could not be abrogated absent the enumerated procedural safeguards.[4]
*433 The Santa Barbara District Attorney, representing respondent sheriff, does not contend otherwise. Instead he argues that petitioner's plea of guilty to the escape charge obviated the necessity for an administrative hearing. We cannot agree. Even if the guilty plea incontestably established a violation of jail rules, petitioner was still entitled to present reasons which might have explained or mitigated the violation, or even might have made loss of credits an inappropriate sanction. (Cf. Gagnon v. Scarpelli (1973) 411 U.S. 778, 790 [36 L.Ed.2d 656, 666, 93 S.Ct. 1756].)[5]
According to jail records, petitioner is presently scheduled to be released on July 20, 1980. Petitioner is entitled to an additional 10 days of good time credit due to him on the escape sentence, if he violated no jail rules during that period of commitment. We recognize that if petitioner also receives the 60 days of credit on the burglary sentence, he would be entitled to immediate release. On the other hand, petitioner's entitlement to that credit is due entirely to the fact that the sheriff failed to provide Wolff-type procedural safeguards  a requirement never before expressly imposed. Consequently, the sheriff should be given reasonable time to comply with Wolff.
The relief requested in the petition for writ of habeas corpus is granted in part as follows: unless respondent sheriff exercises his discretion to release petitioner immediately, he shall, within 15 days, provide to petitioner a hearing on the question of whether a disciplinary violation occurred and, if so, whether and to what extent good time credits on the one-year term are to be forfeited. All good time credits due on the two-month escape sentence shall be restored unless it is shown at the hearing that petitioner violated a jail rule during that period and it is determined that a loss of credit is an appropriate sanction. In all other respects, the relief prayed for is denied.
Stephens, J., and Hastings, J., concurred.
A petition for a rehearing was denied June 24, 1980, and the opinion was modified to read as printed above. Petitioner's application for a hearing by the Supreme Court was denied July 30, 1980. Newman, J., was of the opinion that the application should be granted.
NOTES
[1]  Section 4019 provides in relevant part: "(b) Subject to the provisions of subdivision (d), for each six-day period in which a prisoner is committed to a facility as specified in this section, one day shall be deducted from his period of confinement unless it appears by the record that the prisoner has refused to satisfactorily perform labor as assigned by the sheriff, chief of police, or superintendent of an industrial farm or road camp.

"(c) For each six-day period in which a prisoner is committed to a facility as specified in this section, one day shall be deducted from his period of confinement unless it appears by the record that the prisoner has not satisfactorily complied with the reasonable rules and regulations established by the sheriff, chief of police, or superintendent of an industrial farm or road camp.
"(d) Nothing in this section shall be construed to require the sheriff, chief of police, or superintendent of an industrial farm or road camp to assign labor to a prisoner if it appears from the record that the prisoner has refused to satisfactorily perform labor as assigned or that the prisoner has not satisfactorily complied with the reasonable rules and regulations of the sheriff, chief of police, or superintendent of any industrial farm or road camp.
"(e) No deduction may be made under this section unless the person is committed for a period of six days or longer."
[2]  Subdivision (b) of section 4019 conditions an inmate's entitlement to work time credits on the provisions of subdivision (d), which permits the sheriff to refuse to assign work to a prisoner if the record shows that he has not satisfactorily performed labor or has violated jail regulations. The conditional language of subdivision (b) implies that if the sheriff has not assigned work to a prisoner because of a rules violation, the prisoner is not entitled to work time credits for those days when the opportunity to work was properly withheld. Since petitioner does not allege the number of days he actually worked, or that the sheriff improperly denied him the opportunity to work, we must assume that the loss of 25 days work time credit was due to the fact that the sheriff did not assign him work for a reason valid under subdivision (d). (See People v. Smith (1979) 98 Cal. App.3d 793, 799-700 [159 Cal. Rptr. 749].)
[3]  We can safely assume that petitioner would agree with us had he escaped near the end of the burglary sentence.
[4]  Although Nebraska reserved loss of credits as a sanction for "flagrant or serious misconduct," the absence of similar predicates to the forfeiture provisions of section 4019 obviously does not diminish the importance of the liberty interest involved. Section 4019, subdivision (c) states that the credits "shall" be given "unless" there is misconduct. Each day of credit lost is the loss of a day of liberty to which the inmate would otherwise be entitled. The propriety of procedural safeguards against the arbitrary deprivation of such a "fundamental interest" (see People v. Olivas (1976) 17 Cal.3d 236, 251 [131 Cal. Rptr. 55, 551 P.2d 375]), does not depend upon statutory preconditions to forfeiture. (See People v. Ramirez (1979) 25 Cal.3d 260, 265-268 [158 Cal. Rptr. 316, 599 P.2d 622].)
[5]  Moreover, even if the criminal proceedings could have served as a substitute for the Wolff due process hearing, petitioner was never given "`fair notice of the nature and effect of a hearing intended to serve such a dual purpose.'" (See In re La Croix (1974) 12 Cal.3d 146, 151 [115 Cal. Rptr. 344, 524 P.2d 816]; In re Law (1973) 10 Cal.3d 21, 27 [109 Cal. Rptr. 573, 513 P.2d 621].)
