428 A.2d 661

#### COMMONWEALTH of Pennsylvania, v. Joseph WALKER, a/k/a Joseph Dawes.

Superior Court of Pennsylvania.

Submitted June 29, 1979.

Filed April 20, 1981.

*240Richard W. Hoy, Philadelphia, for appellant.

Eric B. Henson, Assistant District Attorney, Philadelphia, for Commonwealth, appellee.

Before SPAETH, STRANAHAN and SUGERMAN, JJ.*

*

 Pros. Judge John Q. Stranahan of the Court of Common Pleas of Mercer County, Pennsylvania, and Judge Leonard Sugerman of the Court of Common Pleas of Chester County, Pennsylvania, are sitting by designation.

STRANAHAN, Judge:

This matter is before the Court on an appeal of a denial of a post-conviction hearing petition which was filed by Joseph Walker, a/k/a Joseph Dawes.1 The petition was denied without a hearing and the petitioner has appealed.

Joseph Walker was charged with burglary and pleaded guilty to that charge on November 20, 1969. On April 16, 1970 he was placed on five years probation and on April 18, 1972 the petitioner was determined to be in violation of his probation but the sentencing judge continued the probation. On November 27, 1973, the petitioner was again determined to be a probation violator and the trial judge imposed a five to ten year suspended sentence and returned the defendant to five years probation. On December 16, 1974 the defendant was again determined to be a probation violator and the sentencing judge imposed a two to ten years sentence.

On December 5, 1977, a pro se petition under the Post Conviction Hearing Act was filed and was subsequently amended on April 27, 1978. The petition for relief having been denied without a hearing, this appeal was taken.

The issue involved is the failure of the sentencing judge to allow credit towards the defendant’s sentence for time served prior to imposition of sentence. In the present case the defendant served time from August 29, 1967 to April 16, 1970 when he was granted probation.

*241At the time of his sentencing of two to ten years in prison, the sentencing judge made no mention of crediting time that the petitioner had already served.2

The position of the Commonwealth is that the post conviction hearing petition is an inappropriate method of bringing this matter before the court and if the petitioner has any dispute, his dispute rests with the Pennsylvania Board of Probation and Parole and not against the sentencing court. Therefore, the Commonwealth contends that the proper mode of relief is to bring a proceeding in mandamus to compel the Board to grant credit to the prisoner, relying on *Moore v. Roth,*231 Pa.Super. 464, 331 A.2d 509 (1974).3

We disagree with the position of the Commonwealth and are somewhat dismayed that a matter as simple as this should become involved in prolonged procedure that results from an appeal. The law mandates that a person being sentenced shall receive credit on his sentence for all time spent in custody as the result of the criminal charge for which a prison sentence is being imposed. Act of 1974, December 30, P.L. 1052, 345 sec. 1; 18 Pa.C.S.A. 1360.4 For the court to disregard this mandated requirement is clearly error and should be immediately corrected.

The argument that the matter is a dispute between the prisoner and the Board of Probation and Parole simply is not so. If the court has imposed an erroneous sentence on the party being imprisoned, it is the court’s obligation to correct its sentence and bring it into compliance with the *242law. The Post Conviction Hearing Act affords a prisoner the right to bring a proceeding of this type if his rights of due process are being violated.5

It has been held that since a person’s liberty is at stake in a sentencing procedure, it obviously involves the deprivation of due process if the procedure is improper.6 In the present case the defendant will be denied his liberty if he does not receive credit for the time served as required under the statute. *Commonwealth v. Opara,*240 Pa.Super. 511, 362 A.2d 305 (1976).

An examination of the cases indicates that the Superior Court has the power to amend a sentence provided it does not increase the term for which the person is being sentenced. *Commonwealth v. Downer,*161 Pa.Super. 339, 53 A.2d 897 (1947); *Commonwealth ex rel. Spanos v. Keenan,*176 Pa.Super. 245, 107 A.2d 593 (1954).

Such being the case, we enter the following order:

AND NOW, April 20, 1981, IT IS ADJUDGED that the sentence heretofore imposed upon the petitioner by the Court of Common Pleas, Criminal, of Philadelphia County at 337 October Sessions 1976, is amended so as to allow credit to Joseph Walker, a/k/a Joseph Dawes, for time served from August 29, 1967 to April 16, 1970.

In other respects, the order of the court below is affirmed.

1

. Pa.R.Crim.P. 1501 et seq.; 19 P.S. 1180-1 et seq., Act Jan. 25, P.L. (1965) 1580.

2

. Apparently the sentencing judge erroneously thought that no credit was allowed because he believed the defendant was already serving time on another charge.

3

. *Moore v. Roth,*supra, deals with the propriety of acts and proceedings of the Pennsylvania Board of Probation and Parole. It has nothing to do with correcting an erroneous sentence which denies defendant credit for time served.

4

. Pa.R.Crim.P. 1406(b).

5

. *Commonwealth ex rel. Davis v. Pennsylvania Board of Parole,*484 Pa. 197, 398 A.2d 992 (1979).

6

. The denial of the petition without the right to be heard is difficult to understand since the matter could have been easily corrected by the court.