
129 Cal.Rptr.2d 500 (2003)
105 Cal.App.4th 515
The PEOPLE, Plaintiff and Respondent,
v.
Michael Ray JOHNSON, Defendant and Appellant.
No. H023838.
Court of Appeal, Sixth District.
January 17, 2003.
As Modified on Denial of Rehearing February 13, 2003.
Review Granted April 23, 2003.
*501 Dallas Sacher, Assistant Director, Sixth District Appellate Program (Under appointment by the Court of Appeal), for Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Ronald A. Bass, Assistant Attorney *502 General, Gerald A. Engler and Ralph Sivilla, Deputy Attorneys General, for Respondent.
ELIA, J.
Michael Ray Johnson appeals from a modification of the judgment.[1] A jury convicted defendant of two counts of vehicle theft (Veh.Code, § 10851, subd. (a)) and found true that defendant had three prior strike convictions (Pen.Code, § 667, subds.(b)-(i))[2] and two prior prison terms (§ 667.5, subd. (b)). The superior court modified the sentence and redetermined credits after the California Department of Corrections (CDC) alerted the court that the previously imposed sentence was unauthorized. It was the third time that the court had amended the abstract of judgment.
On appeal, defendant argues that the trial court erroneously believed that the Three Strikes law mandated imposition of a consecutive sentence on count two and miscalculated credit for time served by awarding too many actual days of custody credit and by awarding no days of local conduct credit under section 4019.[3] Defendant maintains that he should have been given credit for 1305 actual days of custody and 220 days of section 4019 credit.
We conclude that defendant waived the claim that the sentencing court had discretion to impose a concurrent term on count two by failing to raise the issue below. However, it appears custody credit must be recalculated and corrected.

A. Procedural History

Defendant was arrested on April 14, 1998. The jury found him guilty as charged.
The court initially sentenced defendant on May 27, 1999 to 50 years to life. He was remanded to the custody of the sheriff to be delivered to the custody of the Director of Corrections.
On June 18, 1999, the court issued an order to produce defendant and return him to the custody of the sheriff, who was to bring defendant before the court on June 25, 1999. At a hearing on June 28, 1999, the court explained that the purpose of its order to produce was "to recall the sentence that was imposed on May 27th, 1999" and the court then, on its own motion, recalled defendant's commitment to state prison. (§ 1170, subd. (d).)
*503 The court then proceeded to resentence defendant. It exercised its discretion under section 1385 to strike the three prior felony conviction allegations as to count two (People v. Garcia (1999) 20 Cal.4th 490, 503-504, 85 Cal.Rptr.2d 280, 976 P.2d 831) and the two prior prison term enhancements. The court then sentenced defendant to 25 years to life on count one (§§ 667, subds.(b)-(i), 1170.12) and to eight months on count two, to be served consecutively to the indeterminate term. The court stated: "A sentence of 25 years to life is more than appropriate and but for the constraints of three strikes law, I would have ordered the eight months to be served concurrently, the defendant's total sentence on both counts is now 25 years and eight months to life."
The amended abstract, which reflected the June 28, 1999 modification, showed that defendant was awarded total credit of 638 days for time served consisting of 404 actual days and 234 days local conduct credit. However, the reporter's transcript shows that the court awarded 404 actual days, 202 days credit pursuant to section 4019, and 32 additional actual days for the time spent in state prison under the previously imposed sentence. An order to return, dated June 28, 1999, directed defendant be returned to the sheriff and then transported "back to the custody of the Penal Institution San Quentin-Reception Center."
By letter dated November 23, 1999, defendant's counsel informed the court that defendant's custody credits had not been correctly calculated. On December 10, 1999, the court again amended the judgment and awarded 645 days for time served consisting of 441 actual days and 204 days local conduct credit.
By letter dated July 27, 2001, the CDC alerted the court that it had possibly committed sentencing error by imposing an eight-month term and referred the court to California Rules of Court, rule 451.[4] By letter dated August 24, 2001, the CDC advised that "[t]he term for Count 2 should reflect the full term and not one-third as Count 2 is the only determinate term."
*504 On November 8, 2001, the court set aside the sentence imposed on June 28, 1999. The court again struck the prior prison term enhancements. The court then sentenced defendant to 25 years to life on count one and the lower 16-month term on count two, to be served consecutively to the indeterminate term. The court stated: "I will repeat what I said at the earlier sentencing, that a sentence of 25 years to life is more than enough for these offenses. However, because of the mandates of the three strikes law, I cannot order the term in count two to be served concurrently with that in count one. . .. [T]here are still two separate takings involved here which did not arise from the same set of operative facts; therefore, consecutive sentences must be imposed." Defense counsel declined to be heard. The court then announced: "The Department of Corrections has asked that I award credits for the actual days credit only as they will determine the 4019 credits. The actual credits are 1,381 days."

B. Consecutive Terms

Defendant insists that the trial court erroneously believed it had no authority to impose a concurrent term on count 2 under section 1170.12. Section 1170.12 provides in pertinent part: "(a) Notwithstanding any other provision of law, if a defendant has been convicted of a felony and it has been pled and proved that the defendant has one or more prior felony convictions, as defined in subdivision (b), the court shall adhere to each of the following: . . . [¶] (6) If there is a current conviction for more than one felony count not committed on the same occasion, and not arising from the same set of operative facts, the court shall sentence the defendant consecutively on each count pursuant to this section."[5] (Italics added.) Section 1170.12, subdivision (c), provides in pertinent part: "For purposes of this section, and in addition to any other enhancements or punishment provisions which may apply, the following [punishments] shall apply where a defendant has a prior felony conviction: . . . [¶] (2)(A) If a defendant has two or more prior felony convictions, as defined in paragraph (1) of subdivision (b), that have been pled and proved, the term for the current felony conviction shall be an indeterminate term of life imprisonment with a minimum term of the indeterminate sentence calculated as the greater of [¶] (i) three times the term otherwise provided as punishment for each current felony conviction subsequent to the two or more prior felony convictions, or [¶] (ii) twenty-five years or [¶] (iii) the term determined by the court pursuant to Section 1170 for the underlying conviction, including any enhancement applicable under Chapter 4.5 (commencing with Section 1170) of Title 7 of Part 2, or any period prescribed by Section 190 or 3046."[6] (Italics added.)
*505 Defendant argues that section 1170.12, subdivision (a)(6), "cannot apply when all of the defendant's strike priors are dismissed as to one of two counts" because in this situation there is only one "current conviction." He contends this interpretation is supported by the cardinal rule of statutory construction that "when a word or phrase has been given a particular scope or meaning in one part or portion of a law it shall be given the same scope and meaning in other parts or portions of the law. [Citations.]" (Stillwell v. State Bar (1946) 29 Cal.2d 119, 123, 173 P.2d 313.) He asserts that the term "current felony conviction" as used in other portions of section 1170.12 "refers only to those counts on which two or three strikes punishment is being imposed." He concludes, therefore, that the phrase "current conviction for more than one felony count" (§ 1170.12, subd. (a)(6)) refers to a current felony "conviction which is being punished under the three strikes law" and "section 1170.12, subdivision (a)(6) cannot be understood as requiring a consecutive sentence for a non-strike offense." Defendant maintains that his claim has not been waived by failure to raise it below.
"As a general rule, only `claims properly raised and preserved by the parties are reviewable on appeal.' (People v. Scott (1994) 9 Cal.4th 331, 354, [36 Cal. Rptr.2d 627, 885 P.2d 1040] (Scott).) [The California Supreme Court] adopted this waiver rule `to reduce the number of errors committed in the first instance' (id. at p. 353, [36 Cal.Rptr.2d 627, 885 P.2d 1040]), and `the number of costly appeals brought on that basis' (People v. Welch (1993) 5 Cal.4th 228, 235, [19 Cal.Rptr.2d 520, 851 P.2d 802] . . . (Welch)). . .. Thus, all `claims involving the trial court's failure to properly make or articulate its discretionary sentencing choices' raised for the first time on appeal are not subject to review. (Scott, supra, 9 Cal.4th at p. 353, [36 Cal.Rptr.2d 627, 885 P.2d 1040] [refusing to correct defects in the trial court's statement of reasons for its discretionary sentencing choices]; see also Welch, supra, 5 Cal.4th at p. 236, [19 Cal.Rptr.2d 520, 851 P.2d 802][`[t]raditional objection and waiver principles encourage development of the record and a proper exercise of discretion in the trial court'].)" (People v. Smith (2001) 24 Cal.4th 849, 852, 102 Cal. Rptr.2d 731, 14 P.3d 942.)
"[The California Supreme Court has], however, created a narrow exception to the waiver rule for `"unauthorized sentences" or sentences entered in "excess of jurisdiction."' (Welch, supra, 5 Cal.4th at p. 235, [19 Cal.Rptr.2d 520, 851 P.2d 802].) Because these sentences `could not lawfully be imposed under any circumstance in the particular case' (Scott, supra, 9 Cal.4th at p. 354, [36 Cal.Rptr.2d 627, 885 P.2d 1040]), they are reviewable `regardless of whether an objection or argument was raised in the trial and/or reviewing court.' (Welch, supra, 5 Cal.4th at p. 235, [19 Cal.Rptr.2d 520, 851 P.2d 802].) We *506 deemed appellate intervention appropriate in these cases because the errors presented `pure questions of law' (ibid.), and were `"clear and correctable" independent of any factual issues presented by the record at sentencing.' (Scott, supra, 9 Cal.4th at p. 354, [36 Cal.Rptr.2d 627, 885 P.2d 1040].) In other words, obvious legal errors at sentencing that are correctable without referring to factual findings in the record or remanding for further findings are not waivable." (People v. Smith, supra, 24 Cal.4th at p. 852, 102 Cal.Rptr.2d 731, 14 P.3d 942.)
The rationale of People v. Scott supports application of the waiver rule in this case. An alleged error consisting of a failure to exercise discretion that does not result in an unauthorized sentence is similar to an abuse of discretion that does not result in an unauthorized sentence. Both are claims involving "sentences which, though otherwise permitted by law, were imposed in a procedurally or factually flawed manner." (People v. Scott, supra, 9 Cal.4th 331, 354, 36 Cal.Rptr.2d 627, 885 P.2d 1040.) "[A] sentence is generally `unauthorized' where it could not lawfully be imposed under any circumstance in the particular case." (Ibid.) Imposition of a consecutive term on count two was not an unauthorized sentence in this case.
In addition, although not mentioned by the parties, we note the general rule that a defendant may not raise an issue in a second appeal that could have been raised in the first, absent a showing of good cause or justification. (People v. Senior (1995) 33 Cal.App.4th 531, 538, 41 Cal.Rptr.2d 1; cf. People v. Coelho (2001) 89 Cal.App.4th 861, 873-874, fn. 5, 107 Cal.Rptr.2d 729 [rule not mandatory].) At the June 28, 1999 hearing, the court expressed its belief that the Three Strikes law mandated consecutive terms. There is no apparent reason why the issue now raised could not have been presented in the first appeal. However, this is a cumulative ground upon which we do not rely given our conclusion regarding the waiver rule articulated in People v. Scott, supra, 9 Cal.4th 331, 36 Cal.Rptr.2d 627, 885 P.2d 1040.

C. Custody Credits

The People partially agree with defendant's credit contentions. The People agree that defendant spent 1305 actual days in custody from the date of his arrest on April 14, 1998 until November 8, 2001. The People agree that defendant is entitled to credit of 204 days under section 4019 for the period he was in presentence custody prior to imposition of his initial sentence on May 27, 1999. However, the People argue that defendant is not entitled to additional section 4019 credit for the period between his initial sentence and the subsequent resentencing on June 28, 1999 following recall of his sentence and commitment (§ 1170, subd. (d)).
Defendant urges us to find that he is entitled to full section 4019 credit from the time he was arrested to the date of resentencing following recall, including the time he was in the custody of the prison authorities. Defendant specifically argues that the original sentence must be deemed "vacated" *507 because section 1170, subdivision (d), specifically provides that the resentencing hearing is to be conducted "in the same manner as if he or she had not previously been sentenced." He also contends that the final sentence of section 1170, subdivision (d), stating that "[c]redit shall be given for time served," "must be construed as a reference to section 4019 credit" because otherwise it would be rendered "surplusage." He points out that section 2900.1 already requires an award of actual custody credit. He maintains that his contentions are supported by the California Supreme Court's decision in People v. Buckhalter (2001) 26 Cal.4th 20, 108 Cal.Rptr.2d 625, 25 P.3d 1103. We think that neither party is entirely correct.
In Buckhalter, the defendant argued among other things that an appellate remand to correct his sentence restored him to presentence status and meant that, even though he had been delivered into the Director of Corrections after the original imposition of sentence, his prison confinement was "prior to the imposition of sentence" within the meaning of section 4019, subdivision (a)(4), and he was entitled to credits thereunder until resentenced. (People v. Buckhalter, supra, 26 Cal.4th at p. 34, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) The California Supreme Court made clear that a limited appellate remand regarding sentencing alone does not vacate the original sentence. (Id. at p. 35, 108 Cal. Rptr.2d 625, 25 P.3d 1103.)
The Supreme Court determined: "When, as here, an appellate remand results in modification of a felony sentence during the term of imprisonment, the trial court must calculate the actual time the defendant has already served and credit that time against the `subsequent sentence.' (§ 2900.1.) On the other hand, a convicted felon once sentenced, committed, and delivered to prison is not restored to presentence status, for purposes of the sentence-credit statutes, by virtue of a limited appellate remand for correction of sentencing errors. Instead, he remains `imprisoned' (§ 2901) in the custody of the Director `until duly released according to law' (ibid.), even while temporarily confined away from prison to permit his appearance in the remand proceedings. Thus, he cannot earn good behavior credits under the formula specifically applicable to persons detained in a local facility, or under equivalent circumstances elsewhere, 'prior to the imposition of sentence' for a felony. (§ 4019, subds.(a)(4), (b), (c), (e), (f); see fn. 6, post.) Instead, any credits beyond actual custody time may be earned, if at all, only under the so-called worktime system separately applicable to convicted felons serving their sentences in prison. (§§ 2930 et seq., 2933.)" (People v. Buckhalter, supra, 26 Cal.4th at p. 23, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The Supreme Court accepted "the People's premise that a convicted felon who has once been sentenced, committed, and delivered to prison, who received all credits for confinement prior to the original sentencing, and who remains behind bars pending an appellate remand solely for correction of sentencing errors, is not eligible to earn additional credits for good behavior as a presentence detainee." (Id. at p. 29, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) It stated: "Neither the language nor the purposes of the credit laws oblige the trial court, on remand, to award good behavior credits applicable only to custody which precedes any sentence, commitment, and delivery to prison. [¶] On the contrary, *508 once a convicted felon has been so sentenced, committed, and delivered, he remains, pending a remand solely on sentencing issues, a prisoner in the custody of the Director under the original commitment, even during periods when he is temporarily housed away from state prison to permit his participation in the remand proceedings. Hence, the inmate's accrual of term-shortening sentence credits can arise only under laws and rules specifically applicable to prisoners in the Director's custody." (Id. at pp. 29-30, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The court observed: "The sentencecredit statutes make only one express reference to a sentence modified while in progress. Section 2900.1 provides simply that `[w]here a defendant has served any portion of his sentence under a commitment based upon a judgment which judgment is subsequently declared invalid or which is modified during the term of imprisonment, such time shall be credited upon any subsequent sentence he may receive upon a new commitment for the same criminal act or acts.' (Italics added.)" (People v. Buckhalter, supra, 26 Cal.4th at p. 32, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The court stated: "The sentence-credit statutes do not define the phrases `prior to sentencing' (§ 2900.5, subd. (d)) and `prior to the imposition of sentence' (§ 4019, subd. (a)(4)), nor do they expressly exclude the possibility that time in custody pending a sentence remand might be presentence time. Nonetheless, it appears clear in context that the quoted language refers to confinement prior to the time the defendant was originally sentenced and placed in the custody of the Director to commence service of his term. The statutory scheme, read as a whole, plainly contemplates that once sentenced, committed to prison, and delivered to the Director's custody, a felon remains in that status, serving a term of imprisonment, until lawfully released, and earns credits against the sentence, if at all, only pursuant to the laws specifically applicable to persons serving terms in prison." (People v. Buckhalter, supra, 26 Cal.4th at pp. 32-33, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The court reasoned: "Section 2900.1 thus speaks in terms of a prison sentence already in progress, and, in contrast with section 2900.5, it omits reference to presentence good behavior credits under section 4019. The implication is that once the defendant is committed to prison, his custody is thereafter considered service of his sentence, and-a remand with respect to a sentence the defendant is already serving does not render him eligible for credits of the presentence kind." (People v. Buckhalter, supra, 26 Cal.4th at p. 33, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The court concluded: "Clearly defendant is not entitled to section 4019 credits for his time in a state penitentiary. Nor could he earn them during the time he was physically housed in county jail to permit his participation in the remand proceedings. Section 4019 does allow such credits for presentence custody in specified city or county facilities. (Id., subd. (a)(4).) But defendant's temporary removal from state prison to county jail as a consequence of the remand did not transform him from a state prisoner to a local presentence detainee. *509 When a state prisoner is temporarily away from prison to permit court appearances, he remains in the constructive custody of prison authorities and continues to earn sentence credit, if any, in that status. [Citations.]" (People v. Buckhalter, supra, 26 Cal.4th at p. 33, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
The Supreme Court believed that its conclusions comported with "the distinct purposes of the pre- and postsentence systems for awarding term-shortening credits." (Id. at p. 36, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) It explained: "[T]he pre- and postsentence credit systems serve disparate goals and target persons who are not similarly situated. The presentence credit scheme, section 4019, focuses primarily on encouraging minimal cooperation and good behavior by persons temporarily detained in local custody before they are convicted, sentenced, and committed on felony charges. By contrast, the worktime credit scheme for persons serving prison terms emphasizes penological considerations, including the extent to which certain classes of prisoners, but not others, deserve or might benefit from incentives to shorten their terms through participation in rehabilitative work, education, and training programs operated by the Department of Corrections. [Citations.]" (People v. Buckhalter, supra, 26 Cal.4th at pp. 36-37, 108 Cal.Rptr.2d 625, 25 P.3d 1103, fn. omitted.)
In a footnote in Buckhalter, the Supreme Court expressly left open the question before us, whether section 4019 presentence credits must be awarded for time spent in prison before resentencing following a trial court's recall (§ 1170, subd. (d)). (People v. Buckhalter, supra, 26 Cal.4th at p. 40, fn. 10, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) It stated: "In People v. Honea (1997) 57 Cal.App.4th 842, [67 Cal.Rptr.2d 303] . . . the Court of Appeal, purporting to apply Chew, held the defendant was entitled to section 4019 presentence credits for confinement between the original sentencing and a resentencing that followed the trial court's recall, within 120 days, of the commitment, as is authorized by section 1170, subdivision (d). We express no views on whether a defendant may earn presentence credits during such a period." (People v. Buckhalter, supra, 26 Cal.4th at p. 40, fn. 10, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
In Buckhalter, the Supreme Court rejected "Chew's premises that a sentencing remand transforms a prison sentence already in progress into presentence custody for purposes of the credit statutes, and that the defendant may therefore simultaneously earn both presentence jail time good behavior credits and prison worktime credits while removed from prison to jail pending the remand hearing." (People v. Buckhalter, supra, 26 Cal.4th at p. 40, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) The court stated: "[A] felon once sentenced and committed to prison remains, despite a later remand on sentencing issues, in the custody of the Director, serving time against his ultimate sentence. This holds true whether he is confined in the penitentiary itself or is temporarily housed in county jail pending the remand hearing, and whether his sentence ultimately is modified or is left undisturbed. He may earn article 2.5 prison worktime credits for all confinement in the Director's custody, to the extent he is otherwise eligible, but he cannot accrue presentence good behavior credits under section 4019." (People v. Buckhalter, *510 supra, 26 Cal.4th at p. 40, 108 Cal. Rptr.2d 625, 25 P.3d 1103.) It disapproved Chew insofar as it was inconsistent with its conclusions.[7] (Ibid.)
We now turn to defendant's arguments, which concern statutory interpretation.[8] Section 4019, subdivision (a), provides in pertinent part: "The provisions of this section shall apply in all of the following cases: . . . [¶] (4) When a prisoner is confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp following arrest and prior to the imposition of sentence for a felony conviction."[9] State prison is not a facility specified in section 4019. By its own terms, the section is inapplicable to confinement in state prison.
Section 1170, subdivision (d), which was enacted in 1976 (Stats.1976, ch. 1139, § 273, p. 5141), is a statutory exception to the common law rule that the court loses resentencing jurisdiction once execution of sentence has begun. (Dix v. Superior Court (1991) 53 Cal.3d 442, 455, 279 Cal. Rptr. 834, 807 P.2d 1063.) It states: "When a defendant subject to this section or subdivision (b) of Section 1168 has been sentenced to be imprisoned in the state prison and has been committed to the custody of the Director of Corrections, the court may, within 120 days of the date of commitment on its own motion, or at any time upon the recommendation of the Director of Corrections or the Board of Prison Terms, recall the sentence and commitment previously ordered and resentence the defendant in the same manner as if he or she had not previously been sentenced, provided the new sentence, if any, is no greater than the initial sentence. The resentence under this subdivision shall apply the sentencing rules of the Judicial Council so as to eliminate disparity of sentences and to promote uniformity of sentencing. Credit shall be given for time served." (Italics added.) "Insofar as it is not limited by other phrases in the subdivision, the 'as if language indicates that the resentencing authority conferred by section 1170(d) is as broad as that possessed by the court when the original sentence was pronounced." (Dix v. Superior Court, supra, *511 53 Cal.3d at p. 456, 279 Cal.Rptr. 834, 807 P.2d 1063.)
The term "recall" means cancel or revoke (Webster's Ninth New Collegiate Dictionary (1990) p. 982; The American Heritage College Dictionary (3d ed.1997) p. 1139) or "annul by taking back" (Webster's Third New International Dictionary (1993) p. 1893). These definitions suggest that a defendant who is in local custody following recall of a commitment pursuant to section 1170, subdivision (d), is no longer in the constructive custody of the prison authorities under his previously imposed sentence. (Cf. People v. Buckhalter, supra, 26 Cal.4th at pp. 29-30, 108 Cal. Rptr.2d 625, 25 P.3d 1103 [defendant temporarily housed in county jail to permit participation in remand proceedings limited to sentencing issues still in custody of Director of Corrections].)
In our view, the credit language in section 1170, subdivision (d), makes it clear that the sentencing court has the duty following recall to determine all presentence credit through the time of resentencing following recall. This construction, which is based upon the provision's plain meaning (see People v. Johnson (2002) 28 Cal.4th 240, 244, 121 Cal.Rptr.2d 197, 47 P.3d 1064), is consistent with a sentencing court's usual duty to calculate and award credit. (See § 2900.5, subd. (d).)[10] However, despite defendant's protestations to the contrary, nothing in section 1170, subdivision (d), alters the fact that at some point prior to issuance of the recall order the defendant was delivered to and remained in the custody of the Director of Corrections under his previously imposed sentence.
By its own terms, the provisions of section 4019 are not applicable to prison confinement. In addition, those provisions do not apply while a defendant is in the constructive custody of the prison authorities even if the defendant is temporarily housed in local facilities. (People v. Buckhalter, supra, 26 Cal.4th at p. 33, 108 Cal.Rptr.2d 625, 25 P.3d 1103.) We find Buckhalter's reasoning compelling with regard to those periods that the defendant was in the actual or constructive custody of the prison authorities.
Retroactively treating prison time as presentence confinement in a local facility does not advance the distinct purposes of the separate credit systems. Nothing in the statutory language of section 1170, subdivision (d), indicates that such recharacterization is required. Presumably, the Department of Corrections will provide defendant with any further credit, beyond actual days, to which he may be entitled "pursuant to the laws specifically applicable to persons serving terms in prison" (People v. Buckhalter, supra, 26 Cal.4th at p. 33, 108 Cal.Rptr.2d 625, 25 P.3d 1103) for all time served in the custody of the *512 prison authorities prior to recall. (See §§ 2900.1, 2900.5, subd. (e), 2900-2903.)
We agree with defendant that this court should seek to harmonize section 1170, subdivision (d), with section 2900.1 (added Stats.1949, ch. 519, § 1, p. 926) and to avoid an interpretation that renders words surplusage. (See People v. Loeun (1997) 17 Cal.4th 1, 8-9, 69 Cal.Rptr.2d 776, 947 P.2d 1313.) Section 2900.1 does not address the scope of a trial court's resentencing responsibility following recall under section 1170, subdivision (d).[11] The meaning we ascribe to section 1170, subdivision (d), does not create a conflict with section 2900.1 or render any language in section 1170, subdivision (d), superfluous.
We concur with the parties that the trial court erred in crediting more than 1305 actual days and no presentence credits pursuant to section 4019. We hold that defendant is entitled to credit for confinement in a designated facility as provided by section 4019 through the date of resentencing following recall of defendant's initial sentence and commitment but is not entitled to credit under section 4019 when he was in the actual or constructive custody of the prison authorities under his initially imposed sentence. Since the appellate record does not disclose the date on which defendant was actually delivered to the custody of the Director of Corrections following his initial sentence (see § 2900, subd. (a)), section 4019 credits must be recalculated by the superior court.[12]
We reverse the judgment and remand the matter for the limited purpose of recalculating and crediting defendant with the actual time he has served on his sentence and the section 4019 credits to which he is entitled. The trial court shall amend the abstract of judgment to reflect appropriate credits and forward a certified copy of the amended abstract of judgment to the Department of Corrections.
WE CONCUR: PREMO, Acting P.J., and RUSHING, J.
NOTES
[1]  This court previously affirmed the June 28, 1999 judgment (People v. Johnson (Dec. 21, 2000), H020227) [nonpub. opn.]. No sentencing issues were raised in that appeal. We have granted defendant's request for judicial notice of the appellate record in case No. H020227. (Evid.Code, §§ 452, subd. (d), 459, subd. (a).)
[2]  All further unspecified statutory references are to the Penal Code.
[3]  Section 1237.1 prohibits a defendant from taking an appeal from a judgment of conviction on the ground of an error in the calculation of presentence custody credits unless the error is first presented in the trial court as directed. In People v. Acosta (1996) 48 Cal. App.4th 411, 55 Cal.Rptr.2d 675, an appellate court held: "[S]ection 1237.1 only applies when the sole issue raised on appeal involves a criminal defendant's contention that there was a miscalculation of presentence credits. In other words, section 1237.1 does not require a motion be filed in the trial court as a precondition to litigating the amount of presentence credits when there are other issues raised on direct appeal." (Id. at p. 420, 55 Cal.Rptr.2d 675; accord, People v. Jones (2000) 82 Cal.App.4th 485, 493, 98 Cal. Rptr.2d 329; People v. Duran (1998) 67 Cal. App.4th 267, 270, 78 Cal.Rptr.2d 884.) The People agree that this court may resolve the credit issue since it not the sole issue raised on appeal.
[4]  California Rules of Court rule 4.451, formerly rule 451 which was renumbered effective January 1, 2001, provides in pertinent part: "(a) When a defendant is sentenced under section 1170 and the sentence is to run consecutively to a sentence imposed under section 1168 in the same or another proceeding, the judgment shall specify the determinate term imposed under section 1170 computed without reference to the indeterminate sentence, shall order that the determinate term shall be served consecutive to the sentence under section 1168, and shall identify the proceedings in which the indeterminate sentence was imposed. The term under section 1168, and the date of its completion or parole date, and the sequence in which the sentences are deemed served, will be determined by correctional authorities as provided by law." The Advisory Committee Comment states: "The provisions of section 1170.1(a) limiting consecutive terms to a subordinate term' consisting of one-third of the middle term for the additional crimes (in some cases plus one-third the enhancements) can logically be applied only when all the sentences were imposed under section 1170. Indeterminate sentences under section 1168 will continue to be imposed for some years, considering probation violators. Since the duration of the indeterminate term cannot be known to the court, subdivision (a) sets forth the only feasible mode of sentencing." (Advisory Com. comment,  Cal. Rules of Court (2002 Rev. ed.), foil, rule 4.451, p. 226.)
[5]  Section 667, subdivision (c), likewise provides in pertinent part: "Notwithstanding any other law, if a defendant has been convicted of a felony and it has been pled and proved that the defendant has one or more prior felony convictions as defined in subdivision (d), the court shall adhere to each of the following: . . . [¶] (6) If there is a current conviction for more than one felony count not committed on the same occasion, and not arising from the same set of operative facts, the court shall sentence the defendant consecutively on each count pursuant to subdivision (e)."
[6]  Section 667, subdivision (e), likewise provides in pertinent part: "For purposes of subdivisions (b) to (i), inclusive, and in addition to any other enhancement or punishment provisions which may apply, the following [punishment] shall apply where a defendant has a prior felony conviction: . . . [¶] (2)(A) If a defendant has two or more prior felony convictions as defined in subdivision (d) that have been pled and proved, the term for the current felony conviction shall be an indeterminate term of life imprisonment with a minimum term of the indeterminate sentence calculated as the greater of: [¶] (i) Three times the term otherwise provided as punishment for each current felony conviction subsequent to the two or more prior felony convictions. [¶] (ii) Imprisonment in the state prison for 25 years. [¶]] (iii) The term determined by the court pursuant to Section 1170 for the underlying conviction, including any enhancement applicable under Chapter 4.5 (commencing with Section 1170) of Title 7 of Part 2, or any period prescribed by Section 190 or 3046."
[7]  The Supreme Court has now granted review in a number of cases involving the award of presentence credits on a new sentence. (See People v. Mack (2002) 99 Cal.App.4th 329, 120 Cal.Rptr.2d 907, review granted Aug. 28, 2002, S108531; People v. Ordaz (Oct. 30, 2001.) F034923, [nonpub. opn.], review granted Feb. 20, 2002, S102904; In re Martinez (2001) 94 Cal.App.4th 191, 114 Cal. Rptr.2d 136, review granted Feb. 20, 2002, S103581.) None of the pending cases involves the specific issues before us.
[8]  Defendant has not raised any equal protection contentions. "[I]t has been held that equal protection requires application of section 4019 credits to presentence confinement in a state facility if the circumstances of the confinement are essentially penal. (See People v. Guzman (1995) 40 Cal.App.4th 691, 693-695 [47 Cal.Rptr.2d 53] [person diverted, prior to sentencing, for treatment at California Rehabilitation Center (CRC), but later excluded from CRC as unsuitable, is entitled to § 4019 credits while thereafter still confined at CRC pending sentencing]; see also People v. Nubla (1999) 74 Cal.App.4th 719, 731 [88 Cal.Rptr.2d 265].)" (People v. Buckhalter, supra, 26 Cal.4th 20, 30, fn. 6, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
[9]  Before section 4019, subdivision (a)(4), was added in 1982 (Stats.1982, ch. 1234, § 7, pp. 4553-4554), the California Supreme Court held that the failure of section 4019 to provide presentence credits for felon detainees when it provided such credits for misdemeanant detainees violated equal protection. (People v. Sage (1980) 26 Cal.3d 498, 506-509, 165 Cal.Rptr. 280, 611 P.2d 874.)
[10]  Section 2900.5, subdivision (a), provides in pertinent part: "In all felony . . . convictions, either by plea or by verdict, when the defendant has been in custody, including, but not limited to, any time spent in a jail, . . . prison, . . . or similar residential institution, all days of custody of the defendant, . . . including days credited to the period of confinement pursuant to Section 4019, shall be credited upon his or her term of imprisonment. . . ." Subdivision (d) of section 2900.5 provides as follows: "It shall be the duty of the court imposing the sentence to determine the date or dates of any admission to, and release from, custody prior to sentencing and the total number of days to be credited pursuant to this section. The total number of days to be credited shall be contained in the abstract of judgment provided for in Section 1213."
[11]  In People v. Chew, supra, 172 Cal.App.3d 45, 51, 217 Cal.Rptr. 805, disapproved on another ground in People v. Buckhalter, supra, 26 Cal.4th at p. 40, 108 Cal.Rptr.2d 625, 25 P.3d 1103, the court stated: "Section 2900.1 mandates crediting the `time' served in prison prior to resentencing. Again, that `time' is a reference to actual time in confinement. The purpose of the section is to avoid penalizing the defendant for taking an appeal. The actual custody credits applicable to this time period are to be treated as if no appellate relief had been sought." As previously noted, the Supreme Court in Buckhalter stated: "When, as here, an appellate remand results in modification of a felony sentence during the term of imprisonment, the trial court must calculate the actual time the defendant has already served and credit that time against the `subsequent sentence.' (§ 2900.1.)" (People v. Buckhalter, supra, 26 Cal.4th at p. 23, 108 Cal. Rptr.2d 625, 25 P.3d 1103, italics added.)
[12]  Although the appellate record does not show the date on which defendant was returned to the physical custody of the county sheriff pursuant to the June 18, 1999 order to produce, defendant continued in the constructive custody of prison authorities until the commitment was actually recalled. (Cf. People v. Buckhalter, supra, 26 Cal.4th at pp. 33-34, 108 Cal.Rptr.2d 625, 25 P.3d 1103.)
