
956 N.E.2d 1078 (2011)
353 Ill. Dec. 950
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Daniel L. CLARK, Defendant-Appellant.
No. 2-09-1116.
Appellate Court of Illinois, Second District.
September 14, 2011.
Thomas A. Lilien, Deputy Defender (Court-appointed), Mark G. Levine (Court-appointed), Office of the State Appellate Defender, for Daniel L. Clark.
Joseph P. Bruscato, Winnebago County State's Attorney, Lawrence M. Bauer, Deputy Director, Diane L. Campbell, State's Attorneys Appellate Prosecutor, for People.

OPINION
Presiding Justice JORGENSEN delivered the judgment of the court, with opinion.
¶ 1 Defendant Daniel L. Clark brings this appeal following the denial of his motion to withdraw his negotiated plea of guilty to a single count each of residential burglary (720 ILCS 5/19-3 (West 2004)) and attempted armed robbery (720 ILCS 5/8-4, 18-2 (West 2004)). Defendant contends that his sentence of eight years' imprisonment for the latter offense must be reduced in order to afford him the benefit of his bargain with the State as it concerns sentencing credit for time served in custody before he entered his plea. We agree and we modify the mittimus by reducing defendant's prison term for attempted armed robbery to 6 years and 108 days.
¶ 2 Defendant was arrested on April 5, 2005, and was subsequently charged by indictment with several offenses, including residential burglary, in case No. 05-CF-1003. He remained in custody for 28 days before being released on bond on May 2, 2005. Two days later, defendant was arrested and charged with armed robbery (720 ILCS 5/18-2 (West 2004)) in case No. 05-CF-1320. Thereafter, he remained in custody for 331 days before entering a negotiated plea of guilty to the residential burglary charge and to a reduced charge of attempted armed robbery. Pursuant to *1079 his agreement with the State, defendant was sentenced to an eight-year prison term for each offense and the trial court ordered the sentences to run consecutively. Defendant argues that under the plea agreement, as it was stated at the hearing at which he entered his plea, he is entitled to a total of 650 days' credit toward his aggregate 16-year prison term339 days' credit for time served toward his sentence for residential burglary, plus 311 days' credit toward the sentence for attempted armed robbery. At the hearing on his motion to withdraw his plea, defendant testified that, before he entered his plea, his attorney had told him that the State had agreed that sentencing credit would be calculated in this manner. That testimony was contradicted by the testimony of defendant's attorney, who indicated that he had informed defendant that the State would not agree to a 650-day sentencing credit. Defendant maintains, however, that discussions that did not occur in open court may not be considered in ascertaining the terms of the plea agreement. Defendant acknowledges that the statute governing credit for time served does not permit him to receive double credit for the 311 days during which he was simultaneously in custody for both residential burglary and attempted armed robbery. See People v. Latona, 184 Ill.2d 260, 271, 234 Ill.Dec. 801, 703 N.E.2d 901 (1998) ("[T]o the extent that an offender sentenced to consecutive sentences had been incarcerated prior thereto on more than one offense simultaneously, he should be given credit only once for actual days served."). He maintains, however, that he is still entitled to the benefit of his bargain with the State and that, in lieu of awarding the promised credit, his prison term for attempted armed robbery should be reduced.
¶ 3 In People v. Whitfield, 217 Ill.2d 177, 298 Ill.Dec. 545, 840 N.E.2d 658 (2005), our supreme court explained that "[w]hen seeking relief from a guilty plea, either directly or collaterally, there are two separate, though closely related, constitutional challenges that may be made: (1) that the plea of guilty was not made voluntarily and with full knowledge of the consequences, and (2) that defendant did not receive the benefit of the bargain he made with the State when he pled guilty." Id. at 183-84, 298 Ill.Dec. 545, 840 N.E.2d 658. The latter challenge is rooted in the holding of Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971), that the due process clause mandates that "when a plea rests in any significant degree on a promise or agreement of the prosecutor, so that it can be said to be part of the inducement or consideration, such promise must be fulfilled." Id. at 262, 92 S.Ct. 495.
¶ 4 Illinois Supreme Court Rule 402(b) (eff. July 1, 1997) provides in pertinent part, "If the tendered plea is the result of a plea agreement, the agreement shall be stated in open court." Illinois Supreme Court Rule 402(a)(2) (eff. July 1, 1997) provides that the trial court shall not accept a guilty plea without first informing the defendant of and determining that he or she understands "the minimum and maximum sentence prescribed by law, including, when applicable, the penalty to which the defendant may be subjected because of prior convictions or consecutive sentences." In Whitfield, the defendant entered a guilty plea in exchange for a 25-year prison term. However, in stating the terms of the plea agreement, the prosecutor did not indicate that the defendant would be subject to a three-year period of mandatory supervised release (MSR) after completing his prison term. The trial court ratified the plea agreement as stated by the prosecutor and failed to admonish the defendant, as required by Rule 402(a)(2) (see People v. Wills, 61 Ill.2d 105, 109, 330 N.E.2d 505 (1975)), that the MSR term was part of his sentence. Our supreme court held that "[u]nder these circumstances *1080 * * * adding the statutorily required three-year MSR term to defendant's negotiated 25-year sentence amounts to a unilateral modification and breach of the plea agreement by the State, inconsistent with constitutional concerns of fundamental fairness." Whitfield, 217 Ill.2d at 190, 298 Ill.Dec. 545, 840 N.E.2d 658.
¶ 5 In this case, the prosecutor described the plea agreement as follows:
"The defendant would be sentenced to 8 years in the Department of Corrections on each charge. The sentences are consecutive. * * *
On the attempt armed robbery the defendant has 311 days' credit for time served. On the residential burglary charge the defendant has 339 days' credit for time served.
And that's the full agreement."
Thus, the State represented in open court that it had been agreed that defendant was entitled not only to 339 days' credit toward his sentence for residential burglary, but also to 311 days' credit toward his sentence for attempted armed robbery. Because the sentences were consecutive, the most natural interpretation of the prosecutor's description of the agreement is that defendant would serve a prison term of 8 years, less 339 days, for residential burglary, followed by a prison term of 8 years, less 311 days, for attempted armed robbery. The prosecutor never indicated that, although defendant's sentences were to run consecutively, the sentencing credits would, in effect, apply concurrently, such that the 311-day credit would essentially merge into the 339-day credit.
¶ 6 The trial court ratified the agreement as stated by the prosecutor, never clarifying that defendant would, in fact, receive a total credit of only 339 daysnot 650toward his aggregate sentence. Indeed, the trial court could have only reinforced the notion that the credits would apply separately when it pronounced sentence as follows:
"I am going to sentence you * * * to 8 years in the Department of Corrections on 05-CF-1003. On that case you will receive credit for time served of 339 days.
I will also sentence you * * * to a consecutive sentence of 8 years on 05-CF-1320. On that case you have credit for time served of 311 days."
Nonetheless, in denying defendant's motion to withdraw his plea, the trial court stated that it was not logical for defendant to have thought that he was going to get a double credit "for being in custody on two cases at the same time." We note, however, that, prior to Latona, we had held that the statute governing sentencing credit operated in precisely that fashion. See People v. Johnson, 286 Ill.App.3d 597, 601, 222 Ill.Dec. 76, 676 N.E.2d 1040 (1997).
¶ 7 The State contends that, if defendant believed that he would receive a separate sentencing credit for each offense, he "should then also have believed that he would receive a total of four years MSR, an amalgamation of the two-year term required for each offense." Perhaps that is so, but we fail to see, and State has not explained, how a possible misunderstanding concerning MSR would justify depriving defendant of the benefit of his bargain as it pertains to sentencing credit.
¶ 8 The State also argues that, notwithstanding any shortcomings in the prosecutor's statement of the plea agreement, evidence presented at the hearing on defendant's motion to withdraw his plea shows that, based on private conversations with his attorney, defendant knew that he would not receive double credit for the 311 days when he was simultaneously in custody for both offenses. However, the evidence was conflicting, and the trial court made no specific finding of fact on this point. More importantly, *1081 defendant is correct that, for purposes of identifying the terms of the plea agreement, Whitfield precludes any inquiry into conversations or negotiations that took place out of court. In Whitfield the defendant raised his benefit-of-the-bargain claim not on appeal from his conviction or sentence, but in a petition filed under the Post-Conviction Hearing Act (Act) (725 ILCS 5/122-1 et seq. (West 2002)), in which he alleged that it was not until he arrived at the Department of Corrections that he learned that after serving his prison term he would be subject to an additional three-year MSR term. The Whitfield court relied, in part, on that allegation in concluding that the defendant's failure to raise his benefit-of-the-bargain claim on direct appeal did not result in a procedural default. Whitfield, 217 Ill.2d at 188, 298 Ill.Dec. 545, 840 N.E.2d 658. The Whitfield court also rejected the State's argument that the postconviction petition should have been remanded to the trial court for an evidentiary hearing at which the defendant would bear the burden of proving that, when he entered his guilty plea, he was unaware that a three-year MSR term would be part of his sentence. The Whitfield court reasoned:
"First, it is unclear what sort of additional showing defendant could provide which would establish his lack of knowledge. Secondly, even if, as the State speculates, defendant had some level of general knowledge about MSR terms as a result of his criminal history or evidence could be mustered which would show that MSR was discussed during plea negotiations, it would not establish what defendant reasonably understood the terms of his plea agreement to be at the time he pled guilty. Finally, and most importantly, due process requires that it be evident from the record that a defendant's plea of guilty is entered with full knowledge of the consequences. [Citation.] Where, as here, the record contains no evidence which affirmatively shows that defendant knew that he would be subject to an MSR term, defendant's alleged unawareness must be taken as true." (Emphasis added.) Id. at 200, 298 Ill.Dec. 545, 840 N.E.2d 658.
¶ 9 The State's argument necessarily assumes that the requirement that it be evident from the record that a defendant understand the consequences of his plea may be satisfied by evidence introduced in connection with a postplea motion. It is true that the Whitfield court did not expressly state that the evidence must appear in any particular portion of the record. However, to adopt the State's view would lead to the incongruous and logically indefensible result of penalizing a defendant for raising a benefit-of-the-bargain claim at the earliest opportunity. Had defendant refrained from raising the claim in a motion to withdraw his plea and instead raised it for the first time in a postconviction petition, Whitfield would clearly foreclose any inquiry regarding what defendant knew based on conversations with his attorney (as opposed to what he was told in open court). We can think of no principled reason why a defendant who raises a benefit-of-the-bargain claim in the original trial court proceedings should face a greater burden in establishing the claim than a defendant who raises the claim in a collateral proceeding under the Act. Indeed, the approach the State advocates would reward fraud on the part of those defendants unfortunate enough to learn of their claims in time to raise them in the trial court. Those defendants could simply refrain from raising the issue in postplea motions and instead file postconviction petitions falsely alleging that they were previously unaware of the issue. Postconviction relief is available under Whitfield without an evidentiary hearing, so there is no mechanism for contesting such allegations. A defendant's right to *1082 receive the benefit of his or her bargain with the State should not rest on his or her skill at such procedural gamesmanship.
¶ 10 Our result is also consistent with the approach advocated by Chief Justice Thomas in his special concurrence in Whitfield. Chief Justice Thomas noted that the requirement that a plea agreement be stated in open court "`prevents misunderstandings as to the terms of an agreement. It is an efficient means of reducing what is typically an oral understanding to a matter of record. It also insures that the agreement will be visible for examination. * * * Announcing the agreement in open court will deter * * * future unfounded claims by a defendant that an agreement entered into was not honored.'" (Emphasis in original.) Id. at 209, 298 Ill.Dec. 545, 840 N.E.2d 658 (Thomas, C.J., specially concurring) (quoting People v. Dudley, 58 Ill.2d 57, 60, 316 N.E.2d 773 (1974)). Chief Justice Thomas reasoned that:
"It would be incongruous to hold that the State is free to argue that the terms of the agreement differed from those stated in open court, while at the same time, preclude a defendant from challenging a plea stated in open court on the basis that it differed from an earlier oral understanding. Rule 402(b) takes the guessing game out of discerning the parties' oral understandings by reducing those understandings to a matter of record. This is analogous to a contract setting where the parties' oral negotiations are reduced to a written contract, with all previous understandings merging into the written contract." Id. (Thomas, C.J., specially concurring).
Accordingly, Chief Justice Thomas agreed with the Whitfield majority that there was no need for an evidentiary hearing to ascertain the terms of the defendant's bargain with the State.
¶ 11 Had defendant received 311 days' credit toward his sentence for attempted armed robbery, he would have earned an additional 311 days of good-conduct credit. 730 ILCS 5/3-6-3 (West 2004). The relief that most closely approximates defendant's agreement with the State, as evinced by the record, is to reduce his sentence for attempted armed robbery by 622 days to 6 years and 108 days. Accord Whitfield, 217 Ill.2d at 202, 205, 298 Ill.Dec. 545, 840 N.E.2d 658 (although addition of 3-year MSR term to 25-year prison term deprived defendant of the benefit of his bargain, MSR term could not be stricken, so prison term was reduced by 3 years in order to approximate the bargain that was struck between the parties).
¶ 12 For the foregoing reasons we modify the mittimus to reflect that defendant's prison term for attempted armed robbery is reduced to 6 years and 108 days. In all other respects, the judgment of the circuit court of Winnebago County is affirmed.
¶ 13 Affirmed as modified.
Justices BOWMAN and HUTCHINSON concurred in the judgment and opinion.
