[Crim. No. 9989.

Third Dist.

June 4, 1979.]

#### THE PEOPLE, Plaintiff and Respondent, v. ROBERT MACIAS, Defendant and Appellant.

*789Counsel

Lloyd H. Riley, under appointment by the Court of Appeal, for Defendant and Appellant.

George Deukmejian, Attorney General, Robert Philibosian, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, James T. McNally and Diana B. Constantino, Deputy Attorneys General, for Plaintiff and Respondent.

*790Opinion

KLEAVER, J.*

Defendant was convicted by guilty plea of voluntary manslaughter (Pen. Code, § 192, subd. 1). The sole issue on this appeal1 is the allowance of credit for time served under Penal Code section 2900.5.

A complaint was filed in municipal court on May 19, 1977, alleging a violation of Penal Code section 187 on May 11, 1977. Defendant was in custody at Deuel Vocational Institute (hereinafter DVI) on May 11, 1977, having sustained a prior conviction.2 An information was filed in superior court on June 28, 1977, charging a violation of Penal Code section 187. An amended information was filed on June 5, 1978, charging a violation of Penal Code section 192, subdivision 1, voluntary manslaughter, and defendant entered a guilty plea to the amended information on that date.

At the time of plea the trial court inquired whether a discussion had occurred between the district attorney and defense counsel regarding disposition or judgment. Matters were discussed which are not relevant to the present issue. The guilty plea was entered by defendant and accepted by the trial court. Discussion then followed of credit for time served. The trial court referred to Penal Code section 2900.5 and to *People*v. *Ewing*and *People*v. Watson3 and stated “[the defendant] has to be given credit for the time originally arrested for the offense . . . .”

At the time of sentence defendant was sentenced to prison for the term prescribed by law. The trial court then stated that defendant was given credit for time served from June 5, 1978 (date of entry of guilty plea) and that if the “Third District Court of Appeals or the. State Supreme Court *791decides”4 then he will be given credit from the date of arrest, May 11, 1977. The commitment was to run consecutively to any sentence defendant was then serving.

Defense counsel objected to the allowance of credit for time served as computed by the trial court and contended that credit should be allowed from the date of arrest to date of sentence, rather than date of entry of guilty plea (conviction) to date of sentence. Among other points (none of which are relevant to this opinion) raised by counsel it was contended that the trial court had assured defendant of credit for time served from date of arrest to date of sentence.

The trial court thereupon stated that defendant could set aside the guilty plea if defendant wished to do so. This offer was declined.5

The following issues are considered:

> 1. Was defendant entitled to credit for time served? If so, how much?

> 2. If not, may this court direct the entry of a corrected judgment?

*In re Rojas*(1979) 23 Cal.3d 152 [151 Cal.Rptr. 649, 588 P.2d 789] denies to a defendant any credit for time served prior to sentence on a new offense where that defendant was in custody on a prior state prison sentence between the time of commission of the new offense and sentencing on the new offense. This is so even where the time in custody on the new offense was in a county jail rather than a state prison. *(Id.,*at p. 155; see also *In re Hodges*(1979) 89 Cal.App.3d 221 [152 Cal.Rptr. 394].)

The allowance of 78 days (date of conviction to date of sentence) by the trial court as credit upon the sentence was therefore error. Defendant should not have received any presentence credits under Penal Code section 2900.5.

*792May this court direct the entry of a corrected judgment rescinding the allowance of credit for time served?

Penal Code section 2900.5, subdivision (d), provides, in part: “It shall be the duty of the court imposing the sentence to determine ... the total number of days to be credited . . . [which shall] be contained in the abstract of judgment. . . [Pen. Code, §] 1213.”

California Rules of Court, rule 252, provides, in part: “At the time of sentencing, the court shall cause to be recorded on the judgment or commitment . . . [the presentence credit] .... [T]he court [at time of referral of defendant to probation officer for report] shall direct the sheriff, probation officer, or other appropriate person to report to the court . . . the number of days [the defendant] may be entitled to credit. . . .”

Penal Code section 2900.5 provides a mandatory allowance of credits upon sentence for time served. Rule 252 makes it clear that the process of computing these credits is a ministerial act which may be delegated by the court to the sheriff, probation officer or “other appropriate person.” There is no judicial discretion involved since the credits can neither be supplemented with days beyond those actually served nor withheld by the court for any reason.

The Attorney General has, in his appellate brief, requested that this court modify (or order modification of) the sentence to correct the error, deleting (or ordering the deletion of) the 78 days of presentence credits allowed by the trial court.

A sentence pronounced by a trial court which contains provisions in excess of the court’s jurisdiction may be corrected in a writ proceeding initiated by a defendant *(In re Sandel*(1966) 64 Cal.2d 412 [50 Cal.Rptr. 462, 412 P.2d 806]) or on appeal *(People*v. *Massengale*(1970) 10 Cal.App.3d 689 [89 Cal.Rptr. 237]).

The allowance of presentence credits by the trial court was beyond the jurisdiction of the trial court and may be corrected by that court upon remand. *(People*v. *Massengale, supra,*at p. 693.) Such a correction of judgment is not a penalty imposed on the defendant because of his appeal since the correction of judgment would be required whenever the mistake was discovered, regardless of appeal of defendant. *(Ibid.)*

*793The sentence pronounced by the trial court was in all respects a proper sentence except for the provision as to credit for time served. The conviction is therefore affirmed but the case is remanded to the trial court with directions to enter an amended judgment in accordance with this decision.

Puglia, P. J., and Paras, J., concurred.

*

Assigned by the Chairperson of the Judicial Council.

1

This appeal is taken pursuant to Penal Code section 1239, subdivision (a), and California Rules of Court, rule 31(d), as being solely upon grounds occurring after entry of the guilty plea.

2

The nature of this prior conviction is not clear from the record. The record on appeal reflects that defendant was remanded in custody at DVI after each court appearance on the present charge. There is also a reference at time of sentencing to defendant having been placed “in the hole” (defendant’s term) or in maximum custody (defense counsel’s term) and being segregated from the balance of the prison population. In addition, defendant and plaintiff each assume the fact of confinement at DVI on May 11, 1977, in the appellate briefs.

3

Presumably, *In re Watson*(1977) 19 Cal.Sd 646 [139 Cal.Rptr. 609, 566 P.2d 243] and *In re Ewing*(1978) 78 Cal.App.3d 455 [144 Cal.Rptr. 229].

4

The trial court apparently believed the Supreme Court had before it a case on this same point.

5

Defendant does not claim error in the entry of the guilty plea. The validity of the conviction is therefore conceded. We note, however, that the matter of credit for time served was not a part of a negotiated plea. The information was amended from a charge of murder to a charge of voluntary manslaughter with the understanding of a resultant guilty plea by defendant. The guilty plea was entered and the discussion of Penal Code section 2900.5 followed. At time of sentence defendant declined the offer of the trial court to withdraw his guilty plea.