
172 P.3d 1150 (2007)
STATE of Idaho, Plaintiff-Respondent,
v.
Troy Alton ALLEN, Defendant-Appellant.
No. 33677.
Court of Appeals of Idaho.
November 30, 2007.
*1151 Bujak Law, P.L.L.C., Nampa, for appellant. John T. Bujak argued.
Hon. Lawrence G. Wasden, Attorney General; Jessica M. Lorello, Deputy Attorney General, Boise, for respondent. Jessica M. Lorello argued.
LANSING, Judge.
This is an appeal of the district court's denial of Troy Alton Allen's motion for additional credit for prejudgment incarceration.

I.

BACKGROUND
In 2002, Allen pleaded guilty to driving under the influence. The district court withheld judgment pursuant to Idaho Code § 19-2601(3) and therefore pronounced no sentence of incarceration but placed Allen on probation. On three occasions, Allen was found in violation of terms of his probation. In the first two instances, the district court continued probation with the imposition of additional terms. On the third set of violations, the district court elected to revoke probation, enter a judgment of conviction, commute the sentence pursuant to I.C. § 19-2601(1), and confine Allen in the county jail for nine months. At this sentencing hearing, no express mention was made of credit for Allen's periods of prejudgment incarceration, but the written judgment that followed credited Allen with seventy-seven days that Allen had previously been jailed in relation to this charge.
Shortly thereafter, Allen filed a motion for correction of the sentence, requesting additional credit for time served. In that document, Allen claimed that he had been incarcerated for two hundred and twenty days on arrests for probation violations that occurred during the period of withheld judgment and that the seventy-seven days credited by the court encompassed only the incarceration for the most recent probation violation. Allen asserted that pursuant to State v. Albertson, 135 Idaho 723, 23 P.3d 797 (Ct.App.2001), he was entitled to credit for all the time served before the court entered judgment and commuted the sentence.
The State did not oppose Allen's motion nor contend that he had miscalculated the credit due. The district court declined to allow additional credit, however. Instead, the court issued an amended judgment that stated, in part:
Pursuant to I.C. § 18-309 and State v. Albertson, 135 Idaho 723, 23 P.3d 797 (Ct. App.2001), the following language is inserted to reflect the court's true intent in the imposition of the sentence imposed on July 17, 2006:
In addition to any time you may have already served, pursuant to Idaho Code § 18-309, as a result of this criminal charge, I hereby sentence you to a commuted term of nine (9) months less seventy-seven (77) days and less all credit due since your incarceration on July 17th, 2006, for a release date of January 25th, 2007. *1152 This amendment is made pursuant to the Court's authority under Idaho Criminal Rule 36 since the previous judgment omitted the introductory phrase specified in State v. Albertson, supra.
Allen appeals.[1]

II.

ANALYSIS
When a criminal defendant is sentenced to a period of confinement, credit against the sentence must be given for any periods of incarceration that were served before entry of judgment, save for time served solely as a condition of probation. I.C. §§ 18-309, 19-2603; Albertson, 135 Idaho at 725, 23 P.3d at 799. The credit to which a defendant will be entitled includes time served on arrests for probation violations, as asserted by Allen here. State v. Covert, 143 Idaho 169, 170, 139 P.3d 771, 772 (Ct.App.2006); State v. Lively, 131 Idaho 279, 954 P.2d 1075 (Ct.App.1998). A claim that prejudgment incarceration was not properly credited is a claim that the sentence is illegal which, under Idaho Criminal Rule 35, may be corrected at any time. See State v. Rodriguez, 119 Idaho 895, 897, 811 P.2d 505, 507 (Ct.App.1991).
In Albertson, this Court held that such credit for time previously served must be allowed when a sentence is commuted to jail time under I.C. § 19-2601(1). In that case the defendant was sentenced to a prison term, but the sentence was suspended and he was placed on probation. Later, his probation was revoked and the district court commuted the sentence to one year in the county jail. The district court denied a subsequent motion requesting additional credit for incarceration that had occurred before the commutation order. The district court denied the motion, explaining that when it commuted the sentence it intended that the defendant would serve one year in county jail with credit for only eleven days on the most recent probation violation arrest, although that intent was not expressed at the sentencing hearing. This Court declined to give effect to the district court's after-the-fact statement of its intent. We said:
We recognize that when the district court accepted the parties' stipulation for commutation, it subjectively intended that Albertson would serve a full year in county jail, and the court felt that this sentence modification, allowing the defendant to be incarcerated in the county jail with work release privileges rather than serving his sentence in the state penitentiary, was an exercise of leniency which was, in effect, a substitute for credit for time already served. However, the provisions of I.C. § 18-309 are mandatory and do not confer upon the trial court discretion to disallow credit on a sentence. There was no express waiver by Albertson of his right to credit under § 18-309 as a part of the parties' stipulation. Therefore, we cannot uphold the district court's disallowance of credit on Albertson's commuted sentence for time previously served both before and after his judgment of conviction.
Albertson, 135 Idaho at 726, 23 P.3d at 800 (footnote omitted). In a special concurrence, Judge Schwartzman wrote:
I concur in the opinion of this Court. I write only to suggest that a district judge may properly sentence a defendant in like circumstances to serve a full year on a "commuted" sentence as follows: In addition to whatever time you may have already served, pursuant to I.C. § 18-309, as a result of this criminal charge, I hereby sentence you to a commuted term of 365 days or one year in the county jail.
Id.
The district court here denied Allen's motion for additional credit by entering an amended judgment adopting the suggested language of Judge Schwartzman's special concurrence to reflect what the court described as its true intent at sentencing. This was impermissible, however, because the sentence in the amended judgment does not comport with the sentence pronounced upon Allen at the sentencing hearing. Under Idaho *1153 law, "the only legally cognizable sentence in a criminal case is the `actual oral pronouncement in the presence of the defendant.' The legal sentence consists of the words pronounced in open court by the judge, not the words appearing in the written order of commitment." State v. Wallace, 116 Idaho 930, 932, 782 P.2d 53, 55 (Ct.App.1989) (quoting United States v. Bergmann, 836 F.2d 1220, 1221 (9th Cir.1988)). See also State v. Dreier, 139 Idaho 246, 254, 76 P.3d 990, 998 (Ct.App.2003). Here, once sentence was orally pronounced on Allen, it was, as a matter of law, subject to the credit for time previously served in jail for the same offense pursuant to I.C. § 18-309. As we held in Albertson, this credit must be given effect, notwithstanding a trial court's contrary intent if that intent was not expressed at the sentencing hearing. Perhaps the language suggested by Judge Schwartzman in his Albertson concurrence would be effective to accomplish a district court's intent if that language were used in initially pronouncing the sentence. Once sentence has been pronounced without mention of prejudgment incarceration, however, the court may not increase that sentence by issuing a subsequent judgment or amended judgment that withholds credit mandated by I.C. § 18-309.
Allen's motion for additional credit for time served recited that it was brought pursuant to Idaho Criminal Rule 36, which authorizes trial courts to correct clerical mistakes in judgments or orders, and the district court's amended judgment also referenced Rule 36 as the source of the court's authority to alter the description of the sentence. We conclude, however, that Rule 36 does not provide a vehicle by which a trial court may amend a sentence to give effect to the court's previously unstated intent that alters the sentence.[2] In State v. Phillips, 99 Idaho 354, 355, 581 P.2d 1173, 1174 (1978), our Supreme Court held that I.C.R. 36 does not apply to judicial errors involving the exercise of discretion, as the rule "permits correction of clerical errors but not judicial errors." See also State v. Griffith, 140 Idaho 616, 618, 97 P.3d 483, 485 (Ct.App.2004). A clerical error in typing a written judgment that directly conflicts with an orally pronounced sentence can be corrected by the trial court at any time under I.C.R. 36, State v. Stormoen, 103 Idaho 83, 84, 645 P.2d 317, 318 (1982); Wallace, 116 Idaho at 932, 782 P.2d at 55, but Rule 36 is not "a vehicle for the vindication of the court's unexpressed sentencing expectations, or for the correction of errors made by the court itself." United States v. Robinson, 368 F.3d 653, 656 (6th Cir.2004). See also United States v. Penna, 319 F.3d 509, 513 (9th Cir.2003); United States v. Werber, 51 F.3d 342, 347-48 (2d Cir.1995); United States v. Daddino, 5 F.3d 262, 264-65 (7th Cir.1993).[3] We therefore are constrained to hold that the district court had no authority to enter the amended judgment that substantively altered Allen's sentence, and it is of no effect.
It follows that Allen's original sentence, as pronounced at his sentencing hearing and set forth in the original judgment of conviction, remains in effect, and by operation of law credit against this sentence is allowed for any periods of prejudgment incarceration to which Allen is entitled under I.C. § 18-309. The amended judgment is vacated and this matter is remanded to the trial court for determination of the credit for prejudgment incarceration to be applied against the sentence.
Chief Judge PERRY and Judge GUTIERREZ concur.
NOTES
[1]  Execution of Allen's sentence was stayed pending this appeal by order of the Idaho Supreme Court.
[2]  Idaho Criminal Rule 36 provides:

Clerical mistakes in judgments, orders or other parts of the record and errors in the record arising from oversight or omission may be corrected by the court at any time and after such notice, if any, as the court orders.
[3]  Formerly, Federal Rule of Criminal Procedure was identical to our I.C.R. 36. Effective December 1, 2002, the federal rule was amended to provide: "Clerical Error. After giving any notice it considers appropriate, the court may at any time correct a clerical error in a judgment, order, or other part of the record, or correct an error in the record arising from oversight or omission." The advisory committee notes advise, however, that the changes "are intended to be stylistic only."
