
14 Cal.Rptr.3d 840 (2004)
92 P.3d 335
33 Cal.4th 294
The PEOPLE, Plaintiff and Respondent,
v.
Clemantt ARNOLD, Defendant and Appellant.
No. S106444.
Supreme Court of California.
June 28, 2004.
*841 Shama H. Mesiwala, Sacramento, under appointment by the Supreme Court, and William M. Duncan, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Jo Graves, Assistant Attorney General, Stan A. Cross and Patrick J. Whalen, Deputy Attorneys General, for Plaintiff and Respondent.
BAXTER, J.
In this case we interpret the scope and effect of a defendant's waiver of custody credits  commonly referred to as a "Johnson waiver" (People v. Johnson (1978) 82 Cal.App.3d 183, 147 Cal.Rptr. 55 (Johnson))  which enables a sentencing court to reinstate a defendant on probation after he or she has violated probation, conditioned on service of an additional county jail term, as an alternative to imposing a state prison sentence. We conclude that when a defendant knowingly and intelligently waives jail time custody credits after violating probation in order to be reinstated on probation and thereby avoid a prison sentence, the waiver applies to any future use of such credits should probation ultimately be terminated and a state prison sentence imposed. The Court of Appeal having concluded otherwise, the judgment of that court will be reversed.

FACTS AND PROCEDURAL BACKGROUND
Defendant was detained by police and found to be in possession of rock cocaine base, a pager, and a large amount of cash. On October 21, 1997, representing himself, he pled no contest to possession of a controlled substance. (Health & Saf.Code, § 11350, subd. (a).) To avoid a state prison sentence, he entered a Johnson waiver. The trial court informed defendant that as part of his plea he was "waiv[ing] all time credits through today, and there would be no immediate state prison in this case." Defendant indicated on the record that he understood. As part of the plea form, he executed a written waiver that stated, "I WILL WAIVE ALL CREDITS FOR JAIL TIME SERVED THROUGH 10-21-97." On November 18, 1997, defendant was placed on probation for three years, conditioned on his serving 60 days in the county jail, with credit for 28 days already served (from the date of entry of the plea to sentencing).
One month after sentencing, a petition was filed in the Butte County Superior Court alleging that defendant was in violation of the terms of his probation. Several weeks later, that petition was withdrawn. One year after sentencing, a second petition was filed alleging that defendant was in violation of probation. On May 3, 1999, defendant admitted the allegations of that petition. On June 14, 1999, defendant was reinstated on probation conditioned on his *842 serving an additional 90 days in the county jail. Defendant again entered a Johnson waiver, waiving all custody credits for time already served. On this second occasion the trial court did specifically advise defendant that his waiver of credits applied to any future prison sentence that might be imposed.
On August 4, 2000, a third petition was filed alleging that defendant was once again in violation of the terms of his probation. On November 7, 2000, the petition was sustained. On December 4, 2000, defendant was ordered to undergo a 90-day psychological evaluation pursuant to Penal Code section 1203.03. Thereafter, on March 5, 2001, defendant was sentenced to the middle term of two years in state prison. He was awarded 162 days of actual time served, and 80 days of additional credit. He was not, however, awarded custody credits for the time he served in county jail in 1997 and 1999 under his previously entered Johnson waivers.
Defendant appealed his sentence. He conceded in his opening brief that credit for the time he served in county jail under his second Johnson waiver was unavailable against his prison term, as that waiver was preceded by an express advisement by the trial court informing him that it applied to, and would preclude credit against, any possible future prison sentence. Defendant nonetheless contended that the entry of his first Johnson waiver was not knowing and intelligent in that he did not understand at that time that he was waiving custody credits against a possible future prison sentence.
In an unpublished opinion, over the dissent of one justice, the Court of Appeal agreed, concluding that defendant's initial Johnson waiver was not knowing and intelligent regarding whether the waived custody credits would still be available for crediting against a possible future prison sentence. The Court of Appeal indicated it was specifically following the rationale of People v. Harris (1987) 195 Cal.App.3d 717, 240 Cal.Rptr. 891 (Harris), and rejecting the rationale and holding of People v. Burks (1998) 66 Cal.App.4th 232, 77 Cal.Rptr.2d 698 (Burks). We granted the Attorney General's petition for review.

DISCUSSION
The Johnson court held that "a defendant who has served one year in jail as a condition of probation and who thereafter violates probation may be sentenced to an additional period of up to one year in jail if he knowingly and intelligently waives the provisions of Penal Code section 2900.5." (Johnson, supra, 82 Cal.App.3d at pp. 184-185, 147 Cal.Rptr. 55.) Although Johnson's waiver rule has been a settled rule of criminal procedure in this state for over two decades, it will be helpful to begin our analysis with a brief explanation of the statutory framework that gave rise to the need for the waiver rule in the first instance.

Statutory background
Penal Code section 19.2[1] has long imposed a one-year limitation on the time *843 that can be served in county jail as a condition of probation upon conviction of a felony or misdemeanor, or upon recommitment to the county jail as a condition of reinstatement of probation. (Johnson, supra, 82 Cal.App.3d at p. 185, 147 Cal.Rptr. 55.)
Section 2900.5, enacted in 1971 (Stats.1971, ch. 1732, § 2, p. 3686), originally established a custody credit scheme for the benefit of defendants who were actually sentenced to state prison.[2] Although a defendant committed to state prison received credit against his or her prison sentence for any local time spent in jail, including jail time previously served as a condition of probation for the same offense, the credit scheme first embodied in section 2900.5 had no application to defendants who were being sentenced to local jail time as a condition of probation or reinstatement of probation. (See People v. Brasley (1974) 41 Cal.App.3d 311, 314-317, 115 Cal.Rptr. 910 [section 2900.5, as then in effect, applicable only to state prison commitments]; In re Hays (1953) 120 Cal.App.2d 308, 311, 260 P.2d 1030 [no statute then in existence authorized credit against jail sentences for local time previously served as a condition of probation].)
Hence, prior to the amendment of section 2900.5 in 1976, neither section 19.2 standing alone, nor the interplay of sections 19.2 and 2900.5, provided for any custody credits to be awarded against jail terms for local time previously served in jail as a condition of probation. Section 19.2 merely placed a one-year limitation on county jail terms for any single offense or probation violation, as it does today, and the custody credit scheme of section 2900.5 in effect at that time, although mandating credit for jail time previously served as a condition of probation or otherwise against prison commitments, had no application whatsoever to new county jail commitments.
In 1976, however, subdivision (c) of section 2900.5, which had limited the application of the custody credit scheme of that section to state prison commitments, was amended (Stats.1976, ch. 1045, § 2, p. 4666), in pertinent part, to redefine the "term of imprisonment," i.e., the term against which custody credits are to be applied, to include any "period of imprisonment imposed as a condition of probation...." As a result of this amendment, actual time previously served in county jail, including time served as a condition of probation, would now be credited against any new "term of imprisonment" served in the county jail for the same offense, including any new jail term imposed as a condition of continuing or reinstating the defendant on probation. (See generally People v. Bruner (1995) 9 Cal.4th 1178, 40 Cal.Rptr.2d 534, 892 P.2d 1277; In re Rojas (1979) 23 Cal.3d 152, 156, 151 Cal.Rptr. 649, 588 P.2d 789.)

Chamberlain and Johnson
Two years after section 2900.5 was amended, as explained above, "Justice Bernard Jefferson's concurrence in In re Chamberlain (1978) 78 Cal.App.3d 712, 720, 144 Cal.Rptr. 326 (Chamberlain) pointed out that nothing in the language of section 2900.5 prohibited a defendant from *844 knowingly and intelligently waiving entitlement to custody credits. [¶] In Chamberlain, the trial court suspended a state prison sentence and placed the defendant on probation conditioned upon service of one year in county jail with no credit for the days the defendant had already spent in jail before sentencing. In a petition for habeas corpus filed in the Court of Appeal, the defendant unsuccessfully challenged that order. In a concurring opinion, Justice Jefferson agreed with the majority's denial of relief, but he did so for the following reason: By accepting probation, the defendant had waived his right to custody credits under section 2900.5, and he had done so knowingly and intelligently. But absent such a waiver, Justice Jefferson explained, any period of incarceration without credits would be an illegal sentence under former section 19a (now § 19.2), which `places a one-year limit upon a county jail commitment given as a condition of probation.' (Chamberlain, supra, 78 Cal.App.3d at pp. 720-721, 144 Cal.Rptr. 326 (conc. opn. of Jefferson, J.).)" (People v. Johnson (2002) 28 Cal.4th 1050, 1053-1054, 123 Cal.Rptr.2d 700, 51 P.3d 913.)
Agreeing with Justice Jefferson's concurrence in Chamberlain that same year, the Johnson court recognized that the interplay of section 19.2's long-standing one-year cap on the time that can be served in county jail as a condition of probation for any single violation, and the amendment of section 2900.5, requiring that all local jail time served be credited against any subsequent county jail term imposed as a condition of reinstatement of probation, created a dilemma for sentencing courts in those cases in which the defendant had already served a year or more in county jail as a condition of probation before subsequently violating probation. In such cases, if the sentencing court desired to reinstate the defendant on probation, the interplay of the two statutes forced the sentencing court to choose between sentencing the defendant to state prison or imposing no additional jail time as a condition of reinstatement of probation  because applying custody credit for the earlier one year of county jail time against the new county jail term would result in the defendant's having already served the maximum one-year county jail term permitted under section 19.2 for the new violation. As the Johnson court put it, "if a defendant has served a year in jail as a condition of probation, a violation means either a prison sentence or a fatherly (or motherly) lecture on the evils of crime" because "the court is faced with the Hobson's choice of the `joint' or a `straight walk.'" (Johnson, supra, 82 Cal.App.3d at pp. 185, 187, 147 Cal.Rptr. 55.)
The Johnson court therefore interpreted section 2900.5 as allowing a defendant to waive custody credits under that section for county jail time previously served, in order to permit a sentencing court to reinstate probation conditioned on service of an additional period of up to one year in county jail for the new probation violation, without running afoul of section 19.2's one-year limitation on county jail terms, thereby avoiding the necessity of terminating probation and sentencing the defendant to prison if the court did not see fit to give the defendant a "`straight walk.'" (Johnson, supra, 82 Cal.App.3d at p. 187, 147 Cal.Rptr. 55.)
We recently reaffirmed the validity of the rationale and waiver rule of Johnson in People v. Johnson, supra, 28 Cal.4th 1050, 123 Cal.Rptr.2d 700, 51 P.3d 913. Citing various cases upholding custody credit waivers in a wide variety of circumstances, and noting that Courts of Appeal have not questioned that a defendant may waive entitlement to such credits under section 2900.5, we stated: "Like the Courts of *845 Appeal that have addressed the issue, we too conclude that a defendant may expressly waive entitlement to section 2900.5 credits against an ultimate jail or prison sentence for past and future days in custody." (People v. Johnson, at pp. 1054-1055, 123 Cal.Rptr.2d 700, 51 P.3d 913.)
The precise issue in this case arises when a defendant has been afforded the benefit of one or more Johnson waivers, in order to permit the sentencing court to continue or reinstate the defendant on probation conditioned on service of an additional county jail term as described above, and the most recent probation violation ultimately convinces the court that probation must be terminated and the defendant sentenced to prison. In that situation, may all the previously waived custody credits for local time spent in jail as a condition of probation be recaptured and applied against the state prison sentence being imposed?

Subsequent case law construing Johnson waivers
One of the first cases to address the scope and extent of a Johnson waiver was People v. Zuniga (1980) 108 Cal.App.3d 739, 166 Cal.Rptr. 549 (Zuniga). In that case the defendant, who pled guilty to burglary, received a suspended three-year prison sentence and was placed on probation for three years conditioned on service of one year in the county jail. Defendant, who had been in pretrial custody for 168 days, was given the option of being sentenced to state prison or accepting probation conditioned on the one-year county jail term without credit for the 168 days of presentence confinement. Defendant entered a Johnson waiver, waiving the presentence custody credit and accepting the probationary terms. After serving 156 days of his one-year term, defendant escaped from jail, was recaptured, and pled guilty to escape. Probation was revoked and the previously suspended three-year state prison sentence imposed. He was given credit against his prison term for the 156 days he served prior to his escape from jail, as well as 26 days of work time credit, but not the earlier 168 days of presentence custody covered under the Johnson waiver. On appeal, he sought credit for those days, as well as behavior credits under section 4019. (Zuniga, at pp. 742-743, 166 Cal.Rptr. 549.)
The defendant in Zuniga did not argue his Johnson waiver was not knowing and intelligent in the sense that he did not understand the waiver would apply to any future prison sentence imposed. Rather, he argued the waiver should be held inapplicable given the changed circumstances  that he was going to state prison rather than jail as a condition of probation. The Court of Appeal rejected his argument, explaining: "Defendant, in effect, bargained for a probationary sentence by initially waiving the provisions of Penal Code section 2900.5. The court complied and granted defendant the leniency of probation. Defendant now seeks to retract his portion of the bargain on the basis that he now has been removed from probation and sentenced to state prison. His argument appeals to neither logic nor justice. [¶] Probation is a form of leniency which is predicated on the notion that a defendant, by proving his ability to comply with the requirements of the law and certain special conditions imposed upon him, may avoid the more severe sanctions justified by his criminal behavior. Once given the opportunity for lenient treatment the choice is his as to whether he merits being continued on probation. [¶] Here defendant not only refused to comply with his conditions of probation but committed an additional crime in making his choice. He cannot use his own misconduct as a basis for setting aside the waiver which he executed *846 as a condition for obtaining leniency in the first instance  in effect a renegotiation of his sentence on his own terms. ([Citation].)" (Zuniga, supra, 108 Cal.App.3d at p. 743, 166 Cal.Rptr. 549, italics added.)
Unlike Zuniga, the defendant in Harris, supra, 195 Cal.App.3d 717, 240 Cal.Rptr. 891, did argue that his Johnson waiver was not knowing and intelligent in the sense that he did not understand the waiver would apply to any future prison sentence imposed.
The defendant in Harris was convicted of assault with a deadly weapon in 1981 and placed on formal probation for four years, a condition of which was that he serve five months in the county jail. On three successive occasions his probation was reinstated after findings that he had absconded in violation of the terms of his probation. In April 1986, after a fourth violation, probation was finally revoked and defendant sentenced to three years in state prison for the underlying conviction. The sentencing court credited defendant with 12 months for the time served in county jail on the third probation violation, plus credit for actual time served and work credits while awaiting judgment and sentence on the fourth violation, but denied any credit for actual time previously waived pursuant to Johnson waivers in order that the defendant could be continued on probation with only additional local jail time. (Harris, supra, 195 Cal.App.3d at pp. 719-720, 240 Cal.Rptr. 891.)
On appeal, the defendant in Harris contended he should have been awarded credit against his prison sentence for county jail time served prior to his third probation violation because "his prior [Johnson] waivers of credit for that time were not made with the knowledge that he was also waiving credit against a prison term imposed for a subsequent probation violation." (Harris, supra, 195 Cal.App.3d at p. 721, 240 Cal.Rptr. 891.) The Court of Appeal reviewed the exchanges that took place between defendant, counsel, and the trial court at sentencing for the second and third probation violation hearings when the Johnson waivers were entered. In those colloquies there was no express mention made of the circumstance that the waivers would apply to any future prison sentence that might be imposed if probation was ultimately revoked. The court also reviewed the exchanges that took place at the hearing on the fourth charged probation violation, at which time defendant stated he believed his previous waivers were limited to local jail time, and that he would not have entered those waivers had he known they would apply to a future prison sentence as well. (Harris, at p. 725, 240 Cal.Rptr. 891.) The Court of Appeal accepted on their face defendant's hindsight representations about his understanding of the earlier entered waivers, indicating that "prejudice is apparent by defendant's own representation to the [sentencing] court." (Ibid.) Finding that "[o]n the record before us, we can only conclude defendant's `Johnson waivers' were not knowingly and intelligently made" (ibid.), the Court of Appeal modified the judgment to reflect an award of an additional 29 months, 18 days of credit against defendant's prison sentence. (Id. at p. 726, 240 Cal.Rptr. 891.)
In the instant case, the People concede that the trial court did not expressly advise defendant, in connection with the first Johnson waiver entered both orally and in writing, that the waiver would apply to any state prison sentence imposed if probation was ultimately revoked. On the other hand, the trial court did inform defendant that as of the date of his plea he was waiving "all time credits through today" (italics added), and that there would be "no immediate state prison in this case." *847 Moreover, the entry of plea form defendant executed by defendant contained a written waiver by which he indicated he was waiving "all credits for jail term served through 10-21-97." (Italics added.)
As we have noted, the Court of Appeal below (the same court that decided Harris) expressly relied on Harris to reverse the judgment in this case and remand to the trial court to recalculate defendant's custody credits.[3] The court further indicated it was rejecting the rationale and holding of Burks, supra, 66 Cal.App.4th 232, 77 Cal.Rptr.2d 698, instead "find[ing] Harris to be more persuasive than Burks."
Burks, in contrast to Harris, held that "when a defendant agrees to waive custody credits after violating probation, the waived credits may not be recaptured when probation is violated again, unless the agreement expressly reserves that right. In the absence of such a record, custody credits once waived may not be used again." (Burks, supra, 66 Cal.App.4th at p. 234, 77 Cal.Rptr.2d 698.)
The defendant in Burks was originally placed on probation after pleading no contest to a felony charge of stalking. He served one year in county jail as a condition of the grant of probation. After his first violation, he waived credit for the year he had served and was sentenced to an additional 90 days in county jail as a condition of reinstatement of probation. After a second violation, the court reinstated probation without imposing any additional jail time. Upon his third violation, probation was revoked and the defendant sentenced to state prison for three years. He appealed his sentence, contending he was entitled to the credit for time served that he waived when he was sentenced after his first probation violation. Because the sentencing court failed to advise him that his waiver would apply to a future prison term as well as to his county jail time, the defendant claimed his waiver was not knowing and intelligent. (Burks, supra, 66 Cal.App.4th at p. 234, 77 Cal.Rptr.2d 698.)
Observing that the defendant's argument was supported by the holding in Harris, supra, 195 Cal.App.3d 717, 240 Cal.Rptr. 891, the Burks court nonetheless disagreed with Harris and elected to instead follow the earlier rule stated in Zuniga, supra, 108 Cal.App.3d 739, 166 Cal.Rptr. 549, to the effect that a defendant "`cannot use his own misconduct as a basis for setting aside the waiver which he executed as a condition for obtaining leniency in the first instance.'" (Burks, supra, 66 Cal.App.4th at p. 234, 77 Cal.Rptr.2d 698, quoting Zuniga, supra, 108 Cal.App.3d at p. 743, 166 Cal.Rptr. 549.)
The Burks court explained: "The question before us is whether a defendant who is sent to prison after yet another probation violation may regain his waived credits by asserting he did not understand that his credit waiver would apply to a future prison term. In Zuniga, the court rejected the argument that once a defendant is removed from probation, the bargain that got him there may be renegotiated. (108 Cal.App.3d at p. 743, 166 Cal.Rptr. 549.) The theory that a waiver of custody credits may be set aside because the defendant was inadequately informed of its *848 consequences was first developed in Harris. There, the judge conducting the probation violation proceedings followed Zuniga and refused to give the defendant credit against his prison sentence for the time he had waived when sentenced on his second and third probation violations. The Court of Appeal, Third Appellate District decided that consideration must be given to whether the defendant's waiver was `knowingly and intelligently' made. (Harris, supra, 195 Cal.App.3d at pp. 721-722, 240 Cal.Rptr. 891.) It concluded the defendant `was not made aware of the trap being set for him' when he waived time in order to get a county jail term instead of time in state prison. Therefore, it modified the judgment to restore the previously waived credits. (Id. at pp. 724-726, 240 Cal.Rptr. 891.)" (Burks, supra, 66 Cal.App.4th at p. 235, 77 Cal.Rptr.2d 698.)
The Burks court explained further: "In People v. Salazar [(1994) 29 Cal.App.4th 1550, 35 Cal.Rptr.2d 221], the Court of Appeal, First Appellate District, Division One held that a custody credit waiver may be found to have been voluntary and intelligent from the totality of the circumstances, even if the sentencing court failed to follow the `better course' of specifically advising the defendant regarding the scope of his waiver. (29 Cal.App.4th at p. 1554, 35 Cal.Rptr.2d 221.) Harris was distinguished on the ground that Salazar had failed to object when the trial court stated his waiver was `for all time and for all purposes,' supporting the inference that Salazar understood the waiver would apply to a future prison term. (Id. at pp. 1555-1556, 35 Cal.Rptr.2d 221.)" (Burks, supra, 66 Cal.App.4th at p. 235, 77 Cal.Rptr.2d 698.)
The Burks court in no uncertain terms made clear that "[h]ere, there is nothing in the record to support an inference that Burks knew his waiver applied to state prison time." (Burks, supra, 66 Cal.App.4th at p. 235, 77 Cal.Rptr.2d 698.) Positing that "[i]t might be argued that by insisting on a waiver of more credits than was necessary to comply with the one-year limit on jail commitments, the [sentencing] court must have meant to deprive Burks of credits against a future term of imprisonment," the Burks court answered its own inquiry, "However, there is no indication Burks understood this." (Id. at p. 236, 77 Cal.Rptr.2d 698.) "On the other hand," the court further observed, "there is also no indication Burks thought he would be able to use his credits to reduce a future prison term." (Ibid.) Faced with a silent record which did not establish one way or the other whether the defendant understood his Johnson waiver would apply to a future prison sentence if probation was revoked, the Burks court concluded: "In this situation, we believe the Harris rule improperly bestows a windfall on a defendant who repeatedly violates probation. Harris permits such a defendant to renegotiate a sentencing bargain that was honored by the court but not by the defendant, the very result that was correctly rejected in Zuniga." (Ibid.)

Burks and Zuniga state the sounder rule
We conclude that Burks and Zuniga state the correct rule, consistent with law, logic, and sound public policy, and that Harris must be disapproved.
A Johnson waiver is a waiver of a statutory right to credit for time served against a subsequent county jail or state prison sentence pursuant to section 2900.5. In People v. Johnson, supra, 28 Cal.4th 1050, 123 Cal.Rptr.2d 700, 51 P.3d 913, we recently recognized that: "As the United States Supreme Court has observed, `"[t]he most basic rights of criminal defendants are ... subject to waiver."' (United *849 States v. Mezzanatto (1995) 513 U.S. 196, 201, 115 S.Ct. 797, 130 L.Ed.2d 697.) This is consistent with the well-established rule allowing `"[a] party [to] waive any provision ... intended for his benefit."' (Ibid.; accord, Civ.Code, § 3513; Cowan v. Superior Court (1996) 14 Cal.4th 367, 371, 58 Cal.Rptr.2d 458, 926 P.2d 438.)" (People v. Johnson, supra, 28 Cal.4th at p. 1055, 123 Cal.Rptr.2d 700, 51 P.3d 913.)
The Burks court explained that, "Nothing in the statutory scheme suggests that custody credits are kept in dual accounts, one for use against jail time and one for use against prison time. To the contrary, section 2900.5 treats all credits uniformly, wherever accrued and wherever applied. Therefore, a waiver of custody credits is presumptively applicable to any future term of imprisonment. If a defendant is told by his counsel that his waiver will not affect future prison time, but counsel neglects to inform the court of this aspect of the waiver  as happened in Harris (195 Cal.App.3d at pp. 722-725, 240 Cal.Rptr. 891)  the defendant may seek relief by claiming ineffective assistance of counsel. He should not be permitted to attack his waiver by faulting the court for failing to foresee his recidivism and warn him of its consequences. [¶] Before Burks's waiver was accepted he faced a state prison term, which would have been reduced by his custody credits. He chose to give up those credits in return for the benefits of being reinstated on probation and serving time in jail instead of prison. Having declined one opportunity to offset his custody credits against a prison term, he could not reasonably expect to get another if he violated his terms of probation yet again. `Probation is a form of leniency which is predicated on the notion that a defendant, by proving his ability to comply with the requirements of the law and certain special conditions imposed upon him, may avoid the more severe sanctions justified by his criminal behavior. Once given the opportunity for lenient treatment the choice is his as to whether he merits being continued on probation.' (Zuniga, supra, 108 Cal.App.3d at p. 743, 166 Cal.Rptr. 549.) When a defendant repeatedly makes wrong choices in this situation, it is neither logical nor just to allow him to retract a custody credit waiver that enabled him to prolong his probation, leaving him no worse off after another violation than he was after the violation that prompted the waiver. (Ibid.; People v. Salazar, supra, 29 Cal.App.4th at p. 1555, 35 Cal.Rptr.2d 221.)" (Burks, supra, 66 Cal.App.4th at pp. 236-237, 77 Cal.Rptr.2d 698.)
If probationers are continued on probation notwithstanding two, three, or more probation violations (a not uncommon scenario as we have seen reflected in the facts of the cases discussed above), and if Johnson waivers are entered, and one or two additional periods of up to one year of local jail time are imposed as conditions of each successive probation reinstatement, in many instances the waived credits for the aggregate time served in county jail will equal or be greater than the suspended prison sentence for the original offense. In such cases, if the credits can permissibly be "recaptured" (Burks, supra, 66 Cal.App.4th at p. 234, 77 Cal.Rptr.2d 698) by the defendant when his own misconduct ultimately leads to revocation of probation and imposition of a prison term, he will have no prison term left to serve. In practical effect, under the rule of Harris, a point will be reached in some cases at which those probationers who have repeatedly been shown the most leniency may continue to violate probation with impunity, secure in the knowledge that the spectre of an actual prison sentence is no longer hanging over their heads, as the credit equivalent of the suspended prison sentence that would be imposed if probation *850 were ultimately revoked will already be in the bank, having been served in local jail.
A rule that gives back previously waived credits to a defendant as a consequence of his future violation of probation thus rewards him for his own misconduct. It is also unjust enrichment, as the defendant would be getting the benefit of the bargain reached at his original sentencing and later be permitted to revoke the consideration he gave up to obtain the benefit of that bargain. As a matter of sound sentencing policy, the law should not afford probationers incentives or rewards for refusing to comply with the terms and conditions of probation.[4] The rule of Harris does just that.
We therefore adopt the rationale and holding of Burks, supra, 66 Cal.App.4th 232, 77 Cal.Rptr.2d 698, and disapprove the contrary holding of Harris, supra, 195 Cal.App.3d 717, 240 Cal.Rptr. 891. "As with the waiver of any significant right by a criminal defendant, a defendant's waiver of entitlement to section 2900.5 custody credits must, of course, be knowing and intelligent." (People v. Johnson, supra, 28 Cal.4th at p. 1055, 123 Cal.Rptr.2d 700, 51 P.3d 913.) The gravaman of whether such a waiver is knowing and intelligent is whether the defendant understood he was relinquishing or giving up custody credits to which he was otherwise entitled under section 2900.5. (Burks, supra, 66 Cal.App.4th at p. 236, fn. 3, 77 Cal.Rptr.2d 698.) As the Burks court observed, "section 2900.5 treats all custody credits uniformly, wherever accrued and wherever applied." (Burks, supra, 66 Cal.App.4th at p. 237, 77 Cal.Rptr.2d 698.) A defendant entering a straightforward and unconditional waiver of section 2900.5 credits has no reason to believe that the waiver is anything other than a waiver of such credits for all purposes.
The better practice is for sentencing courts to expressly admonish defendants who waive custody credits under Johnson, supra, 82 Cal.App.3d 183, 147 Cal.Rptr. 55, that such waivers will apply to any future prison term should probation ultimately be revoked and a state prison sentence imposed. (See, e.g., People v. Salazar (1994) 29 Cal.App.4th 1550, 1554, 35 Cal.Rptr.2d 221; People v. Ambrose (1992) 7 Cal.App.4th 1917, 1923, 9 Cal.Rptr.2d 812.) A sentencing court's failure to include such an explicit advisement will not, however, invalidate a Johnson waiver by which the defendant is otherwise found to have knowingly and intelligently relinquished his or her right to custody credits under section 2900.5.
Defendant, in his answer brief before this court, argues that the straightforward test applied in Burks  i.e., whether the defendant understands he is waiving or giving up his right to custody credits to which he is otherwise entitled under section 2900.5  "addresses only one part of the waiver analysis, whether the credits waiver was knowing and intelligent, without regard to the necessity of addressing the scope of the waiver." His latter premise *851 is incorrect, for as we have explained, a waiver of section 2900.5 custody credits is a waiver of such credits for all purposes. There is no basis for a probationer receiving the lenient benefit of reinstatement of probation to suspect that the scope of his or her Johnson waiver is anything less than a waiver and relinquishment of all statutory entitlement to custody credit under section 2900.5 in the fullest sense.
In the somewhat analogous situation where a defendant entering a guilty plea must be advised of all the direct consequences of conviction (see Bunnell v. Superior Court (1975) 13 Cal.3d 592, 605, 119 Cal.Rptr. 302, 531 P.2d 1086), it has been observed that "This requirement relates to the primary and direct consequences involved in the criminal case itself and not to secondary, indirect or collateral consequences. [Citations.] A collateral consequence is one which does not `inexorably follow' from a conviction of the offense involved in the plea. [Citation.] [¶] Our courts have determined that while such consequences as the statutory range of punishment for the conviction, probation ineligibility and a required term of parole are direct consequences of a guilty plea [citations], the possibility of increased punishment in the event of a subsequent conviction is a collateral consequence. [Citations.]" (People v. Crosby (1992) 3 Cal.App.4th 1352, 1355, 5 Cal.Rptr.2d 159.) The possibility that a defendant afforded leniency and placed on probation may subsequently violate the terms of his probation, warranting additional or harsher punishment, is likewise more akin to a collateral consequence than a direct consequence of the criminal conduct which brought the defendant before the sentencing court in the first instance. "He should not be permitted to attack his waiver by faulting the court for failing to foresee his recidivism and warn him of its consequences." (Burks, supra, 66 Cal.App.4th at p. 237, 77 Cal.Rptr.2d 698.)
In the case at bench, at defendant's initial sentencing hearing the trial court informed him that as part of his plea he was "waiv[ing] all time credits through today, and there would be no immediate state prison in this case." Defendant indicated on the record that he understood. As part of the plea form, he then executed a written waiver that stated, "I WILL WAIVE ALL CREDITS FOR JAIL TIME SERVED THROUGH 10-21-97." Nothing in these oral and written advisements suggested to defendant that his waiver was anything other than a full relinquishment of his statutory right to section 2900.5 custody credits for all purposes. Defendant's suggestion that the admonishments he was given failed to advise him of the full scope of his waiver is unsubstantiated. He was correctly informed he was giving up or "waiving all time credits" in the plainest sense of the term. The unequivocal admonishments afforded defendant no basis to conclude his waiver of his statutory right to custody credit was merely for the limited purpose of reinstatement on probation conditioned on service of a county jail term, but not otherwise operative as against the suspended prison sentence that could be imposed should he again violate the terms of his probation. Defendant's suggestion that he misunderstood the full extent of the credit waiver because he did not have the benefit and advice of counsel at the entry of plea proceeding is unavailing; he elected to proceed in propria persona at the time he entered his plea and Johnson waiver and he cannot now be heard to complain that he was prejudiced by his decision to forgo appointed counsel. Nor are we persuaded that a different result should obtain because defendant stated at his subsequent revocation hearing that he did not understand his earlier waiver of all *852 credits for jail time served would encompass a waiver of credits against a possible prison sentence. We will not invalidate an ostensibly knowing and intelligent written waiver of "all credits for jail time" based on such a self-serving statement made over three years after execution of the waiver in question.

CONCLUSION
The judgment of the Court of Appeal is reversed, and the matter remanded to that court for further proceedings consistent with the views expressed herein.
WE CONCUR: GEORGE, C.J., KENNARD, WERDEGAR, CHIN, BROWN and MORENO, JJ.
Concurring Opinion By KENNARD, J.
I concur.
I write separately, however, to emphasize that there is no indication defendant limited the scope of his custody credit waivers in any way. Nor is this a case in which the trial court, sentencing a defendant who has violated probation to state prison, concluded that in the interests of justice some adjustment for time served was appropriate. Those scenarios present questions we leave to another day.
NOTES
[1]  All further references herein are to the Penal Code.

Originally enacted in 1933 as former section 19a (Stats.1933, ch. 848, § 2, p. 2217), section 19.2 now provides in full: "In no case shall any person sentenced to confinement in a county or city jail, or in a county or joint county penal farm, road camp, work camp, or other county adult detention facility, or committed to the sheriff for placement in any county adult detention facility, on conviction of a misdemeanor, or as a condition of probation upon conviction of either a felony or a misdemeanor, or upon commitment for civil contempt, or upon default in the payment of a fine upon conviction of either a felony or a misdemeanor, or for any reason except upon conviction of more than one offense when consecutive sentences have been imposed, be committed for a period in excess of one year; provided, however, that the time allowed on parole shall not be considered as a part of the period of confinement." (Italics added.)
[2]  As originally enacted, subdivision (c) of section 2900.5 provided in pertinent part: "This section shall be applicable only to those persons who are delivered into the custody of the Director of Corrections...." (Stats.1971, ch. 1732, § 2, p. 3686.)
[3]  We note the Court of Appeal further found significant to its holding the circumstance that "defendant did not have an attorney to explain to him the scope of the waiver." Defendant has not argued that his determination to represent himself at the initial plea proceeding when the first Johnson waiver was taken was anything other than free and voluntary. That being the case, it would be manifestly unfair to the People to reward the defendant for not understanding the full import of his first Johnson waiver based on his election to proceed without counsel.
[4]  Indeed, it is not hard to imagine the rule advocated by defendant here and in Harris ultimately working to the detriment of probationers seeking leniency from sentencing courts through reinstatement of probation. If county jail time previously waived as a condition of probation may later be "recaptured" upon subsequent revocation of probation and imposition of the previously suspended state prison term, trial courts as a general matter might be more reluctant to reinstate probation knowing that any county jail time imposed as a condition of reinstatement would only shorten any future prison term that would ultimately have to be imposed should the defendant once again violate his or her probation.
