
103 Wn.2d 636 (1985)
694 P.2d 654
THE STATE OF WASHINGTON, Respondent,
v.
DWIGHT DOUGLAS SMISSAERT, Petitioner.
No. 50500-4.
The Supreme Court of Washington, En Banc.
January 11, 1985.
R. Brent Daniel, for petitioner.
Norm Maleng, Prosecuting Attorney, and Barbara Corey-Boulet, Deputy, for respondent.
*638 DIMMICK, J.
The Court of Appeals dismissed as untimely petitioner Smissaert's appeal of the original judgment in a case in which the trial court later entered a corrected sentence nunc pro tunc. We affirm the trial court's imposition of a life sentence, but reverse the nunc pro tunc entry of sentence. In so doing, we articulate a new rule: When imposition of an increased sentence is required to correct a judicial error, the defendant should be placed in the same position as if the error had not occurred.[1] Under this rule, petitioner will receive credit for any time served and regain his right of appeal since he had waived it at the first sentencing. Such a rule is consistent with equitable principles and past decisions of this court.
Following a jury trial in 1980, petitioner was found guilty of first degree murder committed while armed with a deadly weapon. Judgment was entered August 25, 1980. At that time, petitioner was mistakenly sentenced to a maximum of 20 years in prison. Petitioner did not appeal the judgment and sentence. Subsequently the Board of Prison Terms and Paroles notified the court that RCW 9A.32.040 requires a sentence of life imprisonment. On October 5, 1982, the trial court entered an amended judgment sentencing petitioner to life imprisonment, nunc pro tunc to August 25, 1980. Petitioner filed notice of appeal October 14, 1982, but raised issues relating back to the original trial. Because Rule of Appellate Procedure 5.2(a) requires a party to give notice of appeal within 30 days of entry of final judgment, the Court of Appeals held that petitioner's appeal of his original conviction was more than 2 years too late.
Basically, there are three issues before the court in this case: (1) whether an increased sentence should be imposed *639 on a defendant to correct a judicial error in the original sentence; (2) if so, what is the proper legal procedure to correct the error; and (3) does petitioner have a right to receive credit for time served and a right to appeal his underlying conviction.

INCREASED SENTENCE
[1] In the past, this court has required resentencing to correct invalid sentences. See, e.g., Brooks v. Rhay, 92 Wn.2d 876, 602 P.2d 356 (1979); State v. Pringle, 83 Wn.2d 188, 517 P.2d 192 (1973); Dill v. Cranor, 39 Wn.2d 444, 235 P.2d 1006 (1951). Similarly, we have recognized the trial court's power and duty to correct an erroneous sentence. State v. Loux, 69 Wn.2d 855, 420 P.2d 693 (1966), cert. denied, 386 U.S. 997, 18 L.Ed.2d 347, 87 S.Ct. 1319 (1967); State ex rel. Sharf v. Municipal Court, 56 Wn.2d 589, 354 P.2d 692 (1960); State v. Williams, 51 Wn.2d 182, 316 P.2d 913 (1957); McNutt v. Delmore, 47 Wn.2d 563, 288 P.2d 848 (1955), cert. denied, 350 U.S. 1002, 100 L.Ed. 866, 76 S.Ct. 550 (1956). In fact, sentencing provisions outside the authority of the trial court are "illegal" or "invalid." State v. Luke, 42 Wn.2d 260, 262, 254 P.2d 718, cert. denied, 345 U.S. 1000 (1953); Pringle, at 193-94. In Pringle, we remanded a case for resentencing, noting that it was not "for the purpose of increasing a valid sentence, but rather ... for the correction of an erroneous and invalid sentence." Pringle, at 194.
The Pringle case is particularly significant because it involved imposition of a more onerous judgment on the defendant. We held in that case that the statute mandated inclusion of the trial court's finding of fact that defendant was armed with a deadly weapon at the time of committing robbery. The sentencing judge was without authority to delete the finding in order to lessen defendant's penalty.
Similarly, State v. Luke, supra, involved a more burdensome penalty. There the court had exceeded its statutory authority in imposing concurrent rather than consecutive sentences. Although Luke applied to corrective action taken *640 by the Board of Prison Terms and Paroles without direction of the trial court, this court found that fact insignificant in view of its determination that the statute mandated the consecutive terms.
In the case before us, however, petitioner argues that he is prejudiced by judicial error. He contends that he relied to his detriment on the erroneous sentence and consequently waived his appeal. This court is concerned that a defendant should not be disadvantaged by judicial error. But of equal concern to the court is the proper enforcement of the criminal statutes of this state. Both goals (justice to the petitioner and proper enforcement of the law) can be served by placing petitioner in the same position he would have been in had the correct sentence been imposed originally. The question remaining then is how this should be accomplished.

JUDICIAL PROCEDURE
Two avenues are open for judicial amendment. The trial court can issue a judgment nunc pro tunc, relating the new sentence back to the date of original sentencing. Alternatively, the court can amend contemporaneously, with the new sentence imposed as of the date of entry.
We have recognized the inherent power of Washington courts to enter judgments nunc pro tunc to correct omissions from the record. See, e.g., State v. Petrich, 94 Wn.2d 291, 616 P.2d 1219 (1980); State v. Mehlhorn, 195 Wash. 690, 692, 82 P.2d 158 (1938); Garrett v. Byerly, 155 Wash. 351, 284 P. 343, 68 A.L.R. 254 (1930). "The power is discretionary" and should be consistent with the justice of a particular case. Petrich, at 296, citing In re Estate of Carter, 14 Wn. App. 271, 274, 540 P.2d 474 (1975); Garrett, at 359.
There is, however, contradictory language in Washington cases as to the propriety of a nunc pro tunc entry to correct judicial errors of a substantive nature. We have generally held that a retroactive judgment is appropriate only to correct ministerial or clerical errors. In re Marriage of Pratt, *641 99 Wn.2d 905, 906, 665 P.2d 400 (1983); State v. Ryan, 146 Wash. 114, 261 P. 775 (1927). In Pratt, we reiterated our holding in Ryan:
If the court has not rendered a judgment that it might or should have rendered, or if it has rendered an imperfect or improper judgment, it has no power to remedy these errors or omissions by ordering the entry nunc pro tunc of a proper judgment.
Ryan, at 117. Nonetheless, we have justified entry of a nunc pro tunc decree where there is "an important public purpose for so doing." Pratt, at 911.
An important public purpose may have been the justification for our prior nunc pro tunc corrections of wrongfully imposed sentences. For instance, we have specifically permitted retroactive judgment in a case where a sentence is to be reduced. In re Carle, 93 Wn.2d 31, 34, 604 P.2d 1293 (1980) ("remanded to the trial court for the purpose of resentencing petitioner nunc pro tunc in accordance with this opinion"). Likewise, to prevent any increase in the original sentence, the words "nunc pro tunc" were added to a corrective order in State v. Loux, 69 Wn.2d 855, 859, 420 P.2d 693 (1966), cert. denied, 386 U.S. 997 (1967). The effect and likely intent of the nunc pro tunc judgment in Carle and in the instant case were to credit the defendant for time already served.
[2] A nunc pro tunc entry to correct a sentencing error, however, is neither proper nor necessary. A retroactive entry is proper only to rectify the record as to acts which did occur, not as to acts which should have occurred. Thus resentencing should date from entry of the amended judgment.
Contemporaneous entry, however, does not mean that petitioner thus loses his credit for time served. A 1938 Washington decision makes this point:
[The court] has no power to remedy these omissions by ordering the entry nunc pro tunc of a proper judgment. State v. Ryan, 146 Wash. 114, 261 Pac. 775. Practically considered, the judgment is effective as of the date of its *642 entry, but the minimum and maximum terms imposed are to be reckoned from the date of the prior judgment, thereby giving the appellant credit for the duration of his confinement under the void sentence, a proper provision under the circumstances.
Mehlhorn, at 692-93. Mehlhorn also concerned resentencing of a felon to correct an invalid prior sentence. Clearly this court can order recognition of time served without resort to the legal fiction of nunc pro tunc. In fact equal protection principles require this recognition. See In re Phelan, 97 Wn.2d 590, 647 P.2d 1026 (1982); In re Knapp, 102 Wn.2d 466, 687 P.2d 1145 (1984).
As to the question of petitioner's right to appeal, contemporaneous entry of an amended sentence does not automatically grant a defendant the right to appeal the underlying decision. As the Court of Appeals observed, resentencing to correct an error does not nullify the underlying judgment. See State v. Loux, supra, and State v. Williams, 51 Wn.2d 182, 316 P.2d 913 (1957).[2] Timely appeal from the resentencing itself is valid, but the original judgment is not reopened by later amendment of the sentence. Here again, however, this court has the power to recognize specific situations in which appeal should be granted. This is one of those situations  where appeal was waived at the time of the original judgment.

PETITIONER'S RIGHT TO APPEAL
Petitioner argues that his reliance on the original 20-year *643 sentence influenced his waiver of appeal.[3] Resentencing him to an increased number of years after the running of the time for taking an appeal thus deprives him of his constitutional right to appeal. This position is well taken.
[3] The validity of petitioner's prior waiver of appeal can be attacked on constitutional grounds. This court has enunciated a strong constitutional right of appeal in all cases, and places the burden on the State to prove waiver. State v. Sweet, 90 Wn.2d 282, 286, 581 P.2d 579 (1978). In Sweet, the court recognized that "a conscious, intelligent, and willing failure to appeal could be shown to constitute waiver." Sweet, at 287. In this case, however, petitioner's decision not to appeal may have been based on the erroneous sentence and the possible consequences of appeal. Such a waiver, based on judicial error, is not "conscious, intelligent, and willing."[4]
The waiver of right to appeal can also be analogized to this court's requirements as to entry of a guilty plea, that is, "made intelligently and voluntarily, with an understanding of the full consequences of such a plea." Wood v. Morris, 87 Wn.2d 501, 503, 554 P.2d 1032 (1976). Similarly, Superior Court Criminal Rule 4.2 requires that a defendant be informed of the maximum term to which he may be sentenced upon a guilty plea. See also State v. Barton, 93 Wn.2d 301, 609 P.2d 1353 (1980). The waiver of rights inherent in a guilty plea is similar to waiver of the right to appeal and should mandate the same knowledge of direct consequences. When, as here, a defendant waives his right to appeal based on a judicial error in sentencing, correction of the sentence should reopen the opportunity to appeal the original judgment.


*644 CONCLUSION
We, therefore, reverse the Court of Appeals and reinstate petitioner's appeal. Without forming any opinion as to its success, we allow the appeal to be heard on its merits. We affirm the trial court's imposition of a life sentence on petitioner, but order the trial court to enter the amended judgment as of October 5, 1982, rather than nunc pro tunc to an earlier date, and to credit petitioner for time already served.
WILLIAMS, C.J., and UTTER, BRACHTENBACH, DOLLIVER, PEARSON, and ANDERSEN, JJ., concur. DORE, J. (dissenting)
I believe that the State should be able to correct an erroneous sentence but it must do so within a reasonable amount of time. In both of the cases relied on by the majority  State v. Pringle, 83 Wn.2d 188, 517 P.2d 192 (1973) and State v. Luke, 42 Wn.2d 260, 254 P.2d 718, cert. denied, 345 U.S. 1000 (1953)  the State immediately corrected the invalid sentence, and neither case enhanced the punishment. In the present case, the State did not correct the erroneous sentence caused by its error until 2 years after it had been imposed, and a 20-year sentence was increased to life. There has to come a time when a defendant can rely on the sentence imposed by the State. There has to be a finality of the criminal legal process for the defendant. The State should be prohibited from substantially raising a defendant's sentence 2, 4, or 8 years after a defendant had been sentenced because of the State's fault.
An illustrative example of the injustice that can occur under the majority's holding is the following. A defendant is erroneously sentenced to life imprisonment when he should have received the death penalty. Five years after his erroneous sentence had been imposed, caused by its error, the State, on a nunc pro tunc judgment and sentence, seeks to have him executed. This surely would shock the majority's sense of justice. While the result in this example is *645 more severe than the present case, the principle nonetheless remains the same. I feel strongly that a 2-year delay in correcting a sentence, which enhances a punishment caused by the error of the State, cannot be summarily corrected by an amended judgment nunc pro tunc, without a hearing, without total violation of defendant's due process rights and violation of our state and federal constitutions.
The majority granted the defendant the right of appeal. This raises, however, additional problems that may create great injustices. If the nunc pro tunc judgment and sentence is affirmed, Smissaert can never challenge his enhanced life sentence in a proper hearing forum. On the other hand, the parties may be prejudiced by the unavailability of witnesses 5 years after the original conviction, in the event of a reversal and new trial.
I would reverse the Court of Appeals and order the trial court to reinstate the defendant's original judgment and sentence.
NOTES
[1]  This rule is suggested in an earlier Washington case, State v. Luke, 42 Wn.2d 260, 263, 254 P.2d 718, cert. denied, 345 U.S. 1000 (1953): "Defendant is now in the identical position in which he would be either if the court had done what the statute requires or if he were to be resentenced." Luke is discussed further at pages 639-40 of this opinion. See also State v. Mehlhorn, 195 Wash. 690, 82 P.2d 158 (1938), discussed at page 642 of this opinion.
[2]  Other jurisdictions have addressed the issue of appeal of nunc pro tunc judgments and concluded that appeal should run from the entry of the nunc pro tunc judgment itself, not the earlier date to which it relates. See, e.g., Valley Nat'l Bank v. Meneghin, 130 Ariz. 119, 123, 634 P.2d 570 (1981); Joslin Dry Goods Co. v. Villa Italia, Ltd., 35 Colo. App. 252, 255, 539 P.2d 137, 139 (1975).

A California case similarly recognizes that a nunc pro tunc judgment should not be used unjustly to cut off a party's right of appeal. Phillips v. Phillips, 41 Cal.2d 869, 264 P.2d 926 (1953).
[A] party's right to an appeal cannot be cut off by antedating the entry of the judgment from which he desires to appeal ... Courts have inherent power to enter judgments nunc pro tunc so as to relate back to the time when they should have been entered, but will do so only to avoid injustice.
Phillips, at 875.
[3]  There is no evidence of petitioner's bad faith or deception in promulgating the original sentencing error. In fact, petitioner's counsel alluded to the life sentence as proper, but the prosecutor mistakenly informed the judge of the option of a 20-year maximum sentence.
[4]  It is equally possible that petitioner waived his right because he had no appealable issue.
