Dissenting.
¶ 1 While the Opinion of the majority reveals a careful analysis and a persuasive expression of rationale, I am compelled to a differing position.
¶ 2 The extensive history of this case began with the arrest of appellant in 1991 for the strangulation murder of his wife. Appellant was tried and convicted by a jury of first degree murder on March 29, 1992. The trial court imposed a sentence of life imprisonment, and this Court affirmed that sentence on direct appeal. Commonwealth v. Byrne, 451 Pa.Super. 646, 679 A.2d 848 (1996) (unpublished memorandum). Appellant appealed to the Supreme Court of Pennsylvania, which reversed the order affirming the judgment of sentence. Commonwealth v. Byrne, 548 Pa. 24, 693 A.2d 201 (1997). Appellant was retried, and again convicted by a jury of first degree murder on October 29, 1997. The trial court imposed a sentence of life imprisonment, and appellant again appealed to this Court. A panel of this Court vacated the judgment of sentence, and remanded the case for a third trial. Commonwealth v. Byrne, 742 A.2d 200 (Pa.Super.1999) (unpublished memorandum). Our Supreme Court denied the Commonwealth leave to appeal. Commonwealth v. Byrne, 564 Pa. 702, 764 A.2d 1064 (2000).2
¶ 8 Thereafter, on February 8, 2001, appellant entered into a plea agreement with the Commonwealth, under the terms of which (1) the Commonwealth would accept a plea of guilty to third degree murder and agree to refrain from opposition to an application for parole when appellant becomes eligible for parole, and (2) appellant would be sentenced to serve a term of imprisonment of from ten to twenty years, but would receive credit for but one year of imprisonment served, and waive credit for the balance of the approximately nine years of imprisonment actually served. The trial judge accepted this plea agreement on that same date and sentenced appellant accordingly.
¶ 4 Appellant did not file a direct appeal from the judgment of sentence. Amost a full year later, however, appellant filed a PCRA petition on February 4, 2002, in which he sought credit, despite his agreement, for the full amount of the imprisonment he had served prior to the imposition of sentence. The Assistant Public Defender appointed to represent appellant in the PCRA proceedings filed a motion to withdraw and a “no merit” letter. The trial court gave notice of its intent to dismiss the PCRA petition as meritless on October 21, 2002, and allowed appointed counsel to withdraw. When the trial court dismissed appellant’s PCRA petition on November 20, 2002, appellant filed the instant appeal.
¶ 5 Appellant now challenges the legality of his sentence because he was not given credit for the full amount of the years of imprisonment that he has already served. Appellant contends that because, under the plea agreement, he was sentenced to an additional period of incarceration of from ten years to twenty years, he is effectively serving a sentence that exceeds the statutory penalty that was in effect at the time the crime was committed, and that his acquiescence to the sentence cannot serve to cure its inherent illegality. The Commonwealth, in response, argues that appellant made a knowing, voluntary and intelligent waiver of credit for any time served beyond the one year to which he had agreed. The majority now accepts the argument of the Commonwealth.
*739¶ 6 The ultimate conclusion of the majority, that a defendant can agree to waive credit for time served on a sentence of imprisonment, flows from the premise that the Sentencing Code grants “statutory rights” to a defendant, which the defendant can, in an exercise of discretion, either waive or assert. I am of a different mind, since I do not believe that the Sentencing Code is a grant of rights to a defendant, but is, instead, a legislative restriction upon the power of the Courts to imprison citizens, and delineates what the courts “shall” and “shall not” do. It strikes me that the “General Standards” section of the Sentencing Code so pronounces when it declares:
In selecting from the alternatives set forth in subsection (a) the court shall follow the general principle that the sentence imposed should call for confinement that is consistent with the protection of the public, the gravity of the offense as it relates to the impact on the life of the victim and on the community, and the rehabilitative needs of the defendant. The court shall also consider any guidelines for sentencing adopted by the Pennsylvania Commission on Sentencing and taking effect pursuant to section 2155 (relating to publication of guidelines for sentencing). In every case in which the court imposes a sentence for a felony or misdemeanor, the court shall make as a part of the record, and disclose in open court at the time of sentencing, a statement of the reason or reasons for the sentence imposed. In every case where the court imposes a sentence outside the sentencing guidelines adopted by the Pennsylvania Commission on Sentencing pursuant to section 2154 (relating to adoption of guidelines for sentencing) and made effective pursuant to section 2155, the court shall provide a contemporaneous written statement of the reason or reasons for the deviation from the guidelines. Failure to comply shall be grounds for vacating the sentence and resentencing the defendant.
42 Pa.C.S. § 9721(b) (emphasis supplied).
¶ 7 The Code is similarly unambiguous on the issue of credit for time served, for its provisions are directed to the sentencing court, and state:
§ 9760. Credit for time served
After reviewing the information submitted under section 9737 (relating to report of outstanding charges and sentences) the court shall give credit as follows:
(1) Credit against the maximum term and any minimum term shall be given to the defendant for all time spent in custody as a result of the criminal charge for which a prison sentence is imposed or as a result of the conduct on which such a charge is based. Credit shall include credit for time spent in custody prior to trial, during trial, pending sentence, and pending the resolution of an appeal.
(2) Credit against the maximum term and any minimum term shall be given to the defendant for all time spent in custody under a prior sentence if he is later reprosecuted and resentenced for the same offense or for another offense based on the same act or acts. This shall include credit in accordance with paragraph (1) of this section for all time spent in custody as a result of both the original charge and any subsequent charge for the same offense or for another offense based on the same acts or acts.
42 Pa.C.S. § 9760(1),(2) (emphasis supplied).
¶ 8 As a result, I conclude that the trial court did not have the authority to ignore this clear and certain legislative mandate *740and was obliged to reject the facially flawed plea agreement. Thus, as I see it, the plea agreement was void, and neither appellant nor the Commonwealth should be presently bound by its terms. Consequently, I would vacate the judgment of sentence and remand the case for trial or such other further proceedings as appropriate.
. Since both of appellant’s convictions were reversed, I differ with the view of the majority that the prior prosecutions were "successful.” See: [Majority Opinion, p. 736] Commonwealth v. Byrne, 833 A.2d 729, 736, 2003 WL 22176994 (Pa.Super.2003).