
203 Cal.App.3d 273 (1988)
249 Cal. Rptr. 775
THE PEOPLE, Plaintiff and Respondent,
v.
ROBERT LAINGEN DUESLER, Defendant and Appellant.
Docket No. G004897.
Court of Appeals of California, Fourth District, Division Three.
July 28, 1988.
*274 COUNSEL
Patrick J. Hennessey, Jr., under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, Pat Zaharopoulos and Rhonda L. Cartwright, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[1]]
*275 OPINION
SCOVILLE, P.J.
Robert L. Duesler was convicted of second degree murder. On appeal he contends the sentencing court erroneously deducted his presentence conduct credits without an adequate hearing.

I
Duesler was a night janitor. Arriving at work one night, he drove into a parking lot where the victim was controlling traffic. Duesler explained he worked there, but the victim ordered him to get out of his car. Duesler did not respond, but drove home, returned with a gun and shot the victim several times.
Duesler was charged with murder by use of a handgun. (Pen. Code, §§ 187, 12022.5.) He pleaded not guilty and not guilty by reason of insanity. The jury found Duesler guilty of second degree murder. Duesler withdrew his insanity plea.
The trial court sentenced Duesler to 15 years to life in state prison, plus a 2-year enhancement for use of a deadly weapon. (Pen. Code, §§ 190, 12022.5.) At the sentencing hearing, the court credited Duesler with 76 days of "work time" credit, but ruled he was not entitled to "good time" credit based upon the probation report's statement that he violated jail rules on 4 occasions.[2] The court's withholding of Duesler's conduct credits was made without discussion by the parties. The court briefly mentioned the infractions listed in the probation report and concluded Duesler was not entitled to good behavior credits.

II
Under Penal Code section 4019, certain prisoners are entitled to good behavior credit for time spent in county jail, "unless it appears by the record that the prisoner has not satisfactorily complied with ... [jail] rules and regulations...." (Pen. Code, § 4019, subd. (c).) Prisoners confined to jail prior to sentencing for a felony conviction are among those entitled to Penal Code section 4019 credits. (Pen. Code, § 4019, subd. (a)(4); see People v. Sage (1980) 26 Cal.3d 498, 508 [611 P.2d 874].)
At the sentencing hearing, Duesler did not object to the court's ruling denying him Penal Code section 4019 conduct credits. He now challenges it *276 as an abuse of discretion. (1) He first contends any decision to deduct "good time" credits should be made only by the sheriff or Department of Corrections, since conduct credits are intended to be a disciplinary tool to motivate good prisoner behavior. We disagree. Conduct credits for presentence custody are credited to the defendant's term of imprisonment "in the discretion of the court imposing the sentence." (Pen. Code, § 2900.5, subd. (a).) It is the duty of the sentencing court to determine "the total number of days to be credited ..." for presentence custody. (Pen. Code, § 2900.5, subd. (d); see also People v. Sage, supra, 26 Cal.3d at pp. 508-509; People v. Montalvo (1982) 128 Cal. App.3d 57, 62-63 [183 Cal. Rptr. 242]; Cal. Code Regs., tit. 15, § 3043.)
Although the sheriff is authorized to deduct conduct credits for inmates jailed under a misdemeanor sentence or as a condition of probation, his role with respect to presentence custody credit is to provide the sentencing court with information, records and recommendations. (Cal. Rules of Court, rule 252; People v. Sage, supra, 26 Cal.3d at p. 509.) The sheriff or the People have the burden to show that a defendant is not entitled to Penal Code section 4019 credits. (See People v. Johnson (1981) 120 Cal. App.3d 808, 815 [175 Cal. Rptr. 59].)
Duesler relies on People v. Chew (1985) 172 Cal. App.3d 45, 47 [217 Cal. Rptr. 805]. But that case dealt with credit for prison time between the original sentence and a remand for resentencing after an appeal. The court held that prison (as opposed to jail) time credits "should be initially determined by the responsible administrative agency, not the sentencing court." (Ibid.; see Pen. Code, § 2930 et seq.) The Chew court carefully limited its holding to prison credits and recognized that "jail time" credits under Penal Code section 4019 are a proper concern of the sentencing court. (People v. Chew, supra, 172 Cal. App.3d at p. 50.)
(2) Duesler further asserts he was denied a fair hearing prior to the withholding of his conduct credits. At the sentencing hearing, the issue of Duesler's conduct credits was dealt with very briefly and without discussion by either party. Duesler was not notified in advance of the sentencing hearing that the issue would be raised by the trial court. Although the probation report referred to his poor jail behavior, it did not raise the issue of conduct credits. The record, in fact, contains no recommendation by the probation officer or sheriff as to Duesler's custody credits, as contemplated by California Rules of Court, rule 252.
In In re Walrath (1980) 106 Cal. App.3d 426, 432 [164 Cal. Rptr. 923], the court agreed an inmate is "entitled to certain procedural safeguards before his good time credits [can] be deducted." Citing Wolff v. McDonnell (1974) *277 418 U.S. 539 [41 L.Ed.2d 935, 94 S.Ct. 2963] [involving a similar Nebraska conduct credit statute], the Walrath court listed the following requisite safeguards: "(1) advance written notice of the claimed violation of prison rules; (2) a hearing at which the prisoner [has] the right to call witnesses and present evidence, so long as institutional security [is] 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. [Citation.]" (Ibid.)
The procedural requirements discussed in Walrath apply to administrative hearings conducted by the sheriff at the county jail. (In re Walrath, supra, 106 Cal. App.3d at pp. 432-433.) We have found no cases discussing the due process requirements applicable when a sentencing court deducts a defendant's presentence conduct credits. It is apparent, however, that some minimum due process safeguards must be provided. Courts, including the United States Supreme Court, have recognized that conduct credits are an important liberty interest of inmates. (Wolff v. McDonnell, supra, 418 U.S. at p. 557 [41 L.Ed.2d at pp. 951-952]; In re Walrath, supra, 106 Cal. App.3d at p. 432.) Although Walrath limited its discussion to jail hearings, its mandate of due process safeguards applies equally to a sentencing court's deduction of presentence custody credits. We conclude that before a sentencing court may withhold conduct credits, the defendant is entitled to prior notice and an opportunity to (1) rebut the findings of his jail violations, and (2) present any mitigating factors. (In re Walrath, supra, 106 Cal. App.3d at p. 433.)
The presentence report is an appropriate vehicle for alerting the defendant that his conduct credits are in jeopardy where it suggests or recommends such action. That was not the case here, although the report did touch on Duesler's behavioral problems in the jail. Duesler's counsel should have sought a continuance to contest the court's proposed action, but because he may have been uncertain of his legal basis for such a motion in this rather obscure area of the law, we do not believe it would be appropriate to penalize the defendant for the error in this instance.

III, IV[*]
.... .... .... .... .... .


*278 DISPOSITION
The judgment is reversed insofar as it purports to fix behavior credits, and the matter is remanded to the trial court for recomputation of the credits after a hearing held in accordance with the views expressed here.
.... .... .... .... .... .[*]
Crosby, J., and Wallin, J., concurred.
NOTES
[1]  Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for partial publication. The portions to be published follow.
[2]  Apparently, he was cited for being out of bed after lights out, tearing a sheet into strips, fighting over another inmate's newspaper, and cooking inside the "tank." Duesler was punished by jail authorities for three of these infractions by loss of roof and visitation privileges.
[*]   See footnote, ante, page 273.
