Petitioner brought this habeas corpus proceeding to have determined the applicability of Sections 546.615 and 221.1801 to his sentence of one year in the St. Louis City Workhouse. Upon our determination that both sections were applicable we ordered petitioner discharged if the respondent wardens determined that he had served his sentence in an orderly and peaceable manner. We issue this opinion to clarify for the Bar and Circuit Courts our conclusions regarding sentencing under these statutory provisions.
Petitioner was arrested on August 6, 1972, for shooting into a dwelling house (§ 562.070) and carrying a concealed weapon (§ 564.610), both graded felonies. He was placed in City Jail on August 10, 1972 to await trial. On February 15, 1973 he pleaded guilty to both offenses and was sentenced to two concurrent one year terms in the Workhouse.2 The trial court disallowed petitioner credit for the time he had spent in jail awaiting trial from August 10 until February 15. Petitioner was advised by the trial judge that workhouse time was “flat time” not subject to the provisions of § 546.615. In his writ to this court petitioner asserted that that section applies to all felonies regardless of where served and that when he receives credit for jail time plus credit under § 221.180 (the three-fourths rule) he is entitled to be released.
Respondents contend that neither statute applies to sentences served in the City Workhouse.
Section 546.615 provides in pertinent part that: “A person convicted of a felony shall receive as credit toward service of the sentence imposed all time spent by him in prison or jail both awaiting trial and pending transfer to the department of corrections.” (Emphasis supplied).
Prior to the amendment of this section in 1971, the allowance of jail time was discretionary with the circuit judge. The amendment made such allowance mandatory in felony cases. We do not interpret the last phrase of the section referring to the department of corrections as qualifying this mandatory allowance to those cases where confinement is in an institution operated by the department of corrections. Rather that phrase specifies one of the two times to which the allowance relates, i. e.: *867(1) awaiting trial and (2) pending transfer. A convicted felon is entitled to both times if applicable.
The provisions of § 546.615 are for the benefit of the prisoner. We believe there are circumstances in which he may knowingly and intelligently waive the provisions of that section. It may be that a convicted felon confronted by a trial court with a two year penitentiary sentence and allowance of jail time or a one year workhouse sentence without such allowance may, for various reasons, opt to waive the jail time and serve the latter sentence if the court is willing to give him such a choice. But we cannot find such waiver here. The trial court in good faith, but we find erroneously, advised petitioner that jail time could not be allowed on a workhouse sentence. This constituted an erronous advice of law and cannot provide a foundation for an intelligent and knowing waiver.
Respondents also contend that § 221.180 does not apply to workhouse sentences citing In re Thomas, 306 S.W.2d 336 (Mo.App.1957). That case dealt with a conviction for a misdemeanor in the St. Louis Court of Criminal Corrections. In holding § 221.180 inapplicable in that case we relied upon the provisions of § 479.280 which is specifically limited to punishments imposed by the St. Louis Court of Criminal Corrections. Petitioner here was sentenced by the Circuit Court for a felony and the provisions of § 479.280 do not apply. He has in fact worked throughout his confinement and is entitled to the provisions of § 221.180.
Whether that section pertains to petitioner depends upon whether he has served his sentence in a peaceable and orderly manner, which is a fact determination. We have no facts before us upon which to make that determination. Petitioner was therefore remanded to the custody of respondents and if they determined he had served three-fourths of his sentence (including his jail time from August 10, 1972 to February 15, 1973) in an orderly and peaceable manner, he was ordered discharged.
SIMEONE, KELLY and GUNN, JJ., concur.. All statutory references are to RSMo 1969 (V.A.M.S.).
. Because of his abilities he actually has been in City Jail working as a clerk, with the consent of both wardens and petitioner.