
229 Cal.App.3d 656 (1991)
280 Cal. Rptr. 266
THE PEOPLE, Plaintiff and Respondent,
v.
TOMMY DEAN CORRELL, Defendant and Appellant.
Docket No. A050076.
Court of Appeals of California, First District, Division Three.
April 23, 1991.
*657 COUNSEL
Manuel E. Nestle, under appointment by the Court of Appeal, for Defendant and Appellant.
*658 John K. Van de Kamp, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, John H. Sugiyama, Assistant Attorney General, Martin S. Kaye and Mary A. Roth, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WHITE, P.J.
Tommy Dean Correll appeals from the sentence imposed after a jury found him guilty of residential burglary (Pen. Code, §§ 459-460, subd. 1),[1] and the trial court found true a prior felony enhancement (§ 667.5, subd. (b)).
Appellant contends the trial court improperly required him to waive his presentence credits as a condition of probation. We affirm.

I

FACTS
On the morning of May 19, 1989, a neighbor reported to the police that she saw a man go over the fence at the Villa residence. When the police arrived at the Villa house, they found the kitchen door ajar and entered. The door appeared to have been pried open. The police found appellant under a blanket in a bedroom.
At appellant's booking, the officers found three watches, a gold class ring and Disneyland tickets in his pocket. All of these items belonged to the Villas. An officer testified that after reading appellant his Miranda[2] rights, appellant stated, "I did it."
In his defense, appellant claimed he was suffering from schizophrenia at the time of the offense.
The jury convicted appellant of first degree burglary and the court found the prior felony enhancement true. At the sentencing hearing, appellant argued his schizophrenia and addiction to methamphetamine were mitigating factors. Appellant also argued probation would offer adequate protection to the community and requested that he be placed in the Salvation *659 Army Rehabilitation Center in Sacramento. Appellant voluntarily informed the probation department that he would waive all of his presentence credits.
The People asked the trial judge to sentence appellant to seven years in state prison, but to permanently stay the execution of sentence if appellant successfully completed one year of the Salvation Army program.
Appellant was ineligible for probation absent a finding of unusual circumstances because he had been convicted of residential burglary (§ 462, subd. (a)) and because he had two prior felony convictions (§ 1203, subd. (e)(4)). However, the judge determined that appellant's youth, his mental illness and the fact he was not a career criminal were unusual circumstances which permitted probation. After the judge thoroughly questioned appellant regarding his understanding of his presentence credits, the judge asked if appellant was willing to waive those credits. Appellant agreed to waive his credits, which amounted to 361 days at the time of sentencing. The judge then sentenced appellant to the intermediate term of four years plus one year for the prior. The judge stayed the execution of sentence and placed appellant on probation for five years, provided that, among other regular terms and conditions, appellant attend the Salvation Army program for a period of one year. This timely appeal followed.

II

DISCUSSION
(1) It is established that "Penal Code section 2900.5 permits a defendant to knowingly and intelligently waive the provisions thereof that require all days of custody be credited to his sentence, including any period of imprisonment [imposed] as a condition of probation." (People v. Johnson (1978) 82 Cal. App.3d 183, 188 [147 Cal. Rptr. 55]; People v. Zuniga (1980) 108 Cal. App.3d 739, 742 [166 Cal. Rptr. 549].)
In the present case appellant asserts the trial judge coerced him into waiving his credits. However, appellant told the probation officer before the sentencing hearing that he would waive his credits. Moreover, appellant's counsel informed the trial court that appellant was willing to waive credits before the court requested that he do so. Thus, any assertion that the judge coerced appellant into waiving his credits is not supported by the record. Additionally, the judge voir dired appellant on his knowledge of and willingness to waive his presentence credits. Appellant repeatedly affirmed that he understood what waiving his credits meant and that he was willing to waive his credits. Therefore, appellant clearly waived his credits knowingly, intelligently and voluntarily.
*660 (2a) Appellant also contends his decision to waive presentence credits is an invalid "condition" of probation. Even if his waiver may be properly described as a "condition" of probation, the argument fails.
(3) A trial court has broad discretion in determining the conditions of probation. A probation condition is valid as long as it relates to the crime for which the defendant is convicted, relates to other criminal conduct, or requires or forbids conduct which is reasonably related to future criminality. In applying this standard the rehabilitative and deterrent effect of the conditions should be considered. (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal. Rptr. 905, 541 P.2d 545]; People v. Reinertson (1986) 178 Cal. App.3d 320, 325 [223 Cal. Rptr. 670].)
(2b) We conclude appellant's waiver of custody credits is reasonably related to the trial court's ability to rehabilitate appellant and to deter his future criminal conduct because it expands the trial court's options for dealing with a future violation of probation. A similar point was made in People v. Johnson, supra, 82 Cal. App.3d 183. In that case, a defendant who violated probation asked that he be sentenced to additional jail time and be continued on probation. However, because the defendant had already served one year in county jail, the trial court believed it had no authority to sentence him to further local time and therefore sentenced him to prison. (Id., at p. 185.) The appellate court acknowledged that a defendant may be sentenced to a maximum of one year in county jail as a condition of probation (ibid.; § 19.2), but concluded a defendant may knowingly and intelligently waive his credits in order to serve further additional time as a condition of reinstated probation. (82 Cal. App.3d at pp. 187-188.) The court reasoned that "where a defendant who has spent a year in the county jail as a condition of probation subsequently commits a probation violation, the sentencing judge should not be forced to choose between ignoring the violation or imposing sentence to state prison. The court should be free to choose either of these options in the exercise of its discretion but it should also have the power, with the consent of the defendant, to fashion an intermediate disposition by modifying probation to provide additional time up to one year in jail." (Id., at p. 188.)
Here, at the time he was sentenced, appellant had 361 days of credit. Thus, if he had not waived his credits, the trial court would have only two options in the event he violated probation: (1) continue appellant on probation with a maximum of four additional days in county jail; or (2) order execution of the five-year prison sentence previously imposed. By waiving his credits, appellant gave the trial court the additional option to impose a longer term in county jail while continuing appellant on probation. This additional sentencing tool will permit the court to fashion a punishment *661 which more closely fits the actual seriousness of any future probation violation.[3] Thus, the waiver of credits is directly related to the trial court's ability to rehabilitate appellant and to deter his future criminal conduct because it allows the court to impose an appropriate punishment in the event of a probation violation.
In short, appellant's attempt to distinguish People v. Johnson is unpersuasive.
The judgment is affirmed.
Merrill, J., and Chin, J., concurred.
NOTES
[1]  Subsequent statutory references are to the Penal Code unless otherwise indicated.
[2]  Miranda v. Arizona (1964) 384 U.S. 436 [16 L.Ed.2d 694, 86 S.Ct. 1602, 10 A.L.R.3d 974].
[3]  As the Johnson court observed, a forced choice between prison or no punishment "denies to the court a useful and realistic sentencing tool and is often grossly unfair to the defendant. Many of them simply need additional time in jail to dry out. Many of them need some additional time in jail to bring home the realization that being on probation means more than just sending in a monthly report  in other words that probation has some teeth. However, many do not actually deserve prison." (People v. Johnson, supra, 82 Cal. App.3d at p. 187.)
