
49 Cal.App.3d 97 (1975)
122 Cal. Rptr. 297
THE PEOPLE, Plaintiff and Respondent,
v.
ROBERT HYDE, Defendant and Appellant.
Docket No. 24351.
Court of Appeals of California, Second District, Division Five.
June 12, 1975.
*98 COUNSEL
Clifford Douglas, under appointment by the Court of Appeal, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Howard J. Schwab and William R. Pounders, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
LORING, J.[*]
Information No. A-104198 was filed on May 31, 1968, charging Elmer Robert Hyde (Hyde) and Loretta Lee Vineyard with a *99 violation of Penal Code section 211, on February 7, 1968  a robbery of Rosalie Simon in which great bodily injury was inflicted on Simon. This information was presumably dismissed on February 3, 1969, after Hyde was discharged from custody on petition for writ of habeas corpus. On February 24, 1969, information No. A-107588 was filed charging Hyde with the same offense.[1] He was found guilty and sentenced to state prison on November 26, 1969. The judgment of conviction was affirmed by the Court of Appeal (2d Crim. No. 17515) and remittitur issued August 17, 1970. On August 21, 1973, Hyde filed a motion for credit for presentence jail time alleging that he was arrested April 5, 1968, bail was fixed in the sum of $100,000 which he was unable to make and he remained in jail until he was sentenced to state prison on August 1, 1969, and that under authority of In re Young, 32 Cal. App.3d 68 [107 Cal. Rptr. 915] he was entitled to such credit. The motion was captioned in cases No. A-104198 and A-107588, and was denied in both cases.[2] Hyde appeals from the order denying his motion as an "order made after judgment, affecting the substantial rights of the party." (Pen. Code, § 1237, subd. 2.) Since this appeal was originally scheduled for oral argument in this court, the Adult Authority in an apparent attempt to comply with In re Kapperman, 11 Cal.3d 542 [114 Cal. Rptr. 97, 522 P.2d 657], has given Hyde credit for 455 days in presentence custody in case number 107588 and case number 104198, but has refused to give him credit for 27 days in presentence custody in case number 104198, which case involved the identical offense but which was dismissed on habeas corpus before jeopardy attached. The 27 days which remain in dispute appear to arise out of the fact that Hyde was allegedly held in a Texas jail for 26 days and by the Los Angeles Police Department for 1 day, all allegedly as the result of the fact that he was a fugitive from justice in case number 104198.

CONTENTIONS
Hyde contends that the court erroneously denied his request for credit for 27 days in presentence custody in case number 104198 and that that error may properly be reviewed on appeal under Penal Code section *100 1237, subdivision 2. The People contend that if Hyde is entitled to such credit the proper remedy is by writ of habeas corpus.[3]

DISCUSSION
There is no doubt that Hyde is entitled to credit for presentence time in custody. (In re Kapperman, (1974) 11 Cal.3d 542 [114 Cal. Rptr. 97, 522 P.2d 657]; In re Young, 32 Cal. App.3d 68 [107 Cal. Rptr. 915]; and Pen. Code, § 2900.5.) The only question for us to determine is whether motion and appeal from an order of denial thereof or habeas corpus is the proper process by which to raise the question and obtain a ruling when the factual basis for the claim of credit is in dispute.
The question here presented does not involve a situation in which Hyde is requesting the court to amend its judgment in the usual sense after it has become final and when it no longer has jurisdiction. For all practical purposes Hyde is merely requesting the court to supplement its judgment and advise the Adult Authority of a simple fact (how much presentence time in custody he has been subjected to) in an official and authentic manner so that the Adult Authority can take that action which the statutory law (and the constitutional principles applicable thereto) obligates it to take.
The problem presented by this appeal is somewhat unique since the Supreme Court has now determined that the proviso in Penal Code section 2900.5, which makes its terms prospective only, is unconstitutional and void. The result of that determination is that at the time sentence was pronounced herein on November 26, 1969, Hyde was (if his allegations are true) legally entitled to credit for 27 days of presentence time, but neither he nor the sentencing judge were aware at the time that that was the law. The same situation existed when the judgment became final. Hyde does not now claim that he is entitled to his freedom or that he is being illegally deprived of it. He does not now know whether or not the Adult Authority will at some future date when he is entitled to discharge from custody allow credit for the disputed presentence time in custody. So far as the allegations here are concerned the Adult Authority is neither depriving him of his liberty unlawfully or threatening to do so. Hyde merely seeks an official record *101 of a simple fact before evidence of that fact is lost or destroyed. No precise statutory remedy appears to apply to this problem. If we were to adopt the position of the attorney for the People, Hyde would appear to have a right but no expeditious and adequate remedy. This, of course, is an unconscionable situation which a court of justice cannot tolerate. However, the Legislature has wisely provided a solution. In 1872 it enacted Code of Civil Procedure section 187.[4] Section 187 applies to criminal cases. (People v. Walker, 33 Cal.2d 250, 265 [201 P.2d 6]; People v. Chew Lan Ong., 141 Cal. 550 [75 P. 186]; People v. Palermo Land and Water Co., 4 Cal. App. 717, 722 [89 P. 723, 725]; and quasi-criminal proceeding Michaels v. Superior Court, 184 Cal. App.2d 820, 827 [7 Cal. Rptr. 858].)
In this case the judgment imposed a sentence to state prison "for the term prescribed by law." The "term prescribed by Law' now includes credit for presentence time in custody. The result is, at least in part, a matter of mathematical computation by the Adult Authority when it is advised officially of the actual facts. There must be a judicial process by which disputed facts may be resolved when the defendant and the Adult Authority are unable to agree on the correct answer.
We are unable to find any statutory authority for reciting in the judgment that defendant is allowed credit for a designated number of days because those were the number of days that he was subjected to presentence custody. It has apparently developed as a custom and practice because it is a simple process for officially advising the Adult Authority of a fact which it needs to know in order to discharge its duty. Penal Code section 2900.5 does not specifically require that such information be in the judgment. That section does not specifically designate how a defendant shall be given the credit thereby authorized or what official is charged with that responsibility. However, by virtue of the indeterminate sentence law and the provisions of Penal Code sections 2940, 2941 and 2942[5] the ultimate and final responsibility would *102 appear to be imposed upon the Adult Authority. We realize that when section 2942 was adopted in 1941, section 2900.5, as interpreted by the Supreme Court in In re Kapperman, supra, was not yet effective and the term "any time credits allowed" did not encompass credits allowed under section 2900.5. However, we see no reason why the terminology "any time credits allowed" is not broad enough to encompass credits under section 2900.5. The ultimate obligation to allow credit for presentence time in custody, therefore, is imposed on the Adult Authority. As we read In re Kapperman, supra, the Supreme Court said as much when it said at page 550: "... We hereby direct the Adult Authority to take appropriate steps to inform petitioner and all other persons under its custody and supervision of the availability of that credit, to ascertain the amount of credit due and to adjust its records accordingly." In re Kapperman, however, unlike the case at bar, did not involve a situation where the precise amount of credit is disputed and the defendant and the Adult Authority are unable to agree on the disputed facts.
(1) If the credit authorized by Penal Code section 2900.5 depends upon a disputed issue of fact we see no reason why that disputed question may not be presented, on motion and notice, for resolution to the court which imposed the sentence and which has ready access to the information necessary to resolve the dispute. In Potomac Oil Co. v. Dye, 14 Cal. App. 674 [113 P. 126, 130], the court speaking of the power of courts under Code of Civil Procedure section 187 (in a civil case) said: "... `The court entertaining the action has jurisdiction not only to command the performance of duties, but to enforce its commands by subsequent proceedings in the action.... If complete relief is not given by the order of the court, to avoid other actions, other orders will be made until that end is attained.' (Palmer v. Jones, 49 Iowa, 408.) This authority is plainly expressed in section 187, Code of Civil Procedure."
See also, Tide Water Assoc. Oil Co. v. Superior Court, 43 Cal.2d 815 [279 P.2d 35] and Citizens Utilities Co. v. Superior Court, 59 Cal.2d 805 [31 Cal. Rptr. 316, 382 P.2d 356]. We see no valid reason why the same principle should not apply in a criminal case.
*103 Under Code of Civil Procedure section 128, "Every court shall have power: .... To compel obedience to its judgments, orders and process.... in an action or proceeding pending therein." See 1 Witkin, California Procedure, Courts, sections 116-118, pages 385-388. When a court sitting in a criminal case subsequent to final judgment makes an order on motion and notice specifying the amount of presentence time in custody a defendant is entitled to credit for, it, in effect, is making an order particularizing its judgment that the defendant is sentenced to state prison "for the term prescribed by law." Such order (specifying amount of presentence time in custody the defendant is entitled to credit for) would be reviewable under Penal Code section 1237, subdivision 2, as an order after judgment affecting the substantial rights of the party. As was said in People v. Anderson, 44 Cal. App.3d 723, 730 [118 Cal. Rptr. 908]: "The length of presentence confinement served by defendant is not set forth. Thus, upon remand, it will be necessary for the superior court to ascertain that time and issue an appropriate order to the Adult Authority to credit defendant with the presentence confinement served."
This case presents a very practical problem. Hyde is probably incarcerated in a county other than Los Angeles County. Technically an application for habeas corpus therefore would normally be presented to the superior court in the county where he is incarcerated. That county usually has no file in the case and no official knowledge of the facts, and would undoubtedly be required to refer the matter to the court wherein the sentence was imposed for determination of the facts.
In our view the superior court has inherent power recognized in Code of Civil Procedure section 128, and express statutory power under Code of Civil Procedure section 187, on motion of the defendant, the People or the Adult Authority, to supply such information (the amount of presentence time in custody a defendant under sentence is entitled to credit for) to the Adult Authority in an official and authentic form, and the denial of a request to do so is an order which has a substantial effect on a defendant's rights. The propriety of an order denying such request is obviously an order which affects the substantial rights of the party. If the Adult Authority, after receipt of such information, fails to perform its statutory duty, habeas corpus would then be an appropriate remedy.
Since the right claimed by appellant in the case at bar is clear from the outset, we see no reason in logic or common sense why the question may not be addressed to the sentencing court directly regardless of what the process (motion or petition for writ of habeas corpus or petition for writ *104 of coram nobis) may be called. The question having been properly presented to the proper court for determination, the order of that court denying a hearing to which the applicant is clearly entitled, may be reviewed by this court as an "order made after judgment affecting the substantial rights of the party" under Penal Code section 1237, subdivision 2. This appeal therefore may be maintained.
Nothing in this opinion should be interpreted as indicating that Hyde is or is not entitled to the disputed credit. That question can be resolved by the trial court only after hearing appropriate evidence. All we determine is that the trial court should have heard the motion.
The order (denying credit for presentence time in custody) is reversed.
Kaus, P.J., and Stephens, J., concurred.
NOTES
[*]   Assigned by the Chairman of the Judicial Council.
[1]  On our own motion we have augmented the record on appeal herein to include the entire superior court file in case numbers A104198 and A107588 and have verified that in each case the information charged a violation of Penal Code section 211 (robbery) on May 7, 1968, and that the victim in each case was Rosalie Simon.
[2]  The record on appeal does not include a reporter's transcript. The clerk's transcript indicates that the motion was denied without an appearance by the defendant and that the motion was not actually heard on its merits. Presumably, therefore it was denied because the court concluded that a motion was the wrong remedy.
[3]  We note that in People v. Martinez (4 Crim. 6265, filed Apr. 24, 1974), the Court of Appeal for the Fourth Appellate District agreed with the People's contention but that on June 19, 1974, the Supreme Court made its order providing that People v. Martinez, supra, should not be published.
[4]  "When jurisdiction is, by the Constitution or this Code, or by any other statute, conferred on a Court or judicial officer, all the means necessary to carry it into effect are also given; and in the exercise of this jurisdiction, if the course of proceeding be not specifically pointed out by this Code or the statute, any suitable process or mode of proceeding may be adopted which may appear most conformable to the spirit of this Code."

See also, Code of Civil Procedure section 128.
[5]  Penal Code section 2940, reads: "Where the Adult Authority is authorized to fix and refix the term of imprisonment of a prisoner, such prisoner shall be discharged from custody upon the completion of said term so fixed or refixed and if the Adult Authority fails to fix the term of imprisonment the prisoner shall be discharged upon the completion of the maximum punishment provided by law for the offense for which the prisoner was convicted."

Penal Code section 2941, reads: "Where the Adult Authority is not authorized to fix or refix the term of imprisonment of a prisoner such prisoner shall be discharged only upon the completion of the specified term fixed by law."
Penal Code section 2942, reads: "The discharge date in the two preceding sections shall be shortened to the extent of any time credits allowed and not forfeited."
