
344 S.W.3d 269 (2011)
Brian BUEHRLE, Appellant,
v.
MISSOURI DEPARTMENT OF CORRECTIONS, Respondent.
No. ED 95367.
Missouri Court of Appeals, Eastern District, Division Five.
June 21, 2011.
*270 Brian M. Buehrle, Federal Correctional Complex, Forrest City, AR, pro se.
Chris Koster, Atty. Gen., Terrence M. Messonnier, Jefferson City, MO, for respondent.
GARY M. GAERTNER, JR., Presiding Judge.

Introduction
Brian Buehrle (Appellant) appeals from the trial court's judgment granting the Missouri Department of Corrections' (MDOC) motion for a judgment on the pleadings. We affirm.

Background
Appellant was arrested and charged with multiple counts of Possession of Child Pornography, in violation of Section 573.037, RSMo (2004), and held in state custody. While the state charges were pending, he was transferred into federal custody where he was charged with one count of Possession of Child Pornography, in violation of 18 U.S.C. § 2252A(a)(5)(B). He pleaded guilty in both state and federal courts, and was sentenced to 88 months in federal prison on the federal charges, and to 12 years in the MDOC on the state charges. After sentencing, Appellant was delivered on May 29, 2007 to the MDOC, which awarded him a credit of approximately 280 days for the time he was in custody in both state and federal custody awaiting trial and sentencing.
Appellant filed a petition seeking declaratory judgment permitting him to waive his jail-time credit for his Missouri sentence. He stated that he would prefer the credit be applied to his federal sentence,[1] but under 18 U.S.C. § 3585(b), a federal defendant could only be given credit for jail time if the time has not already been credited against another sentence. The trial court found that the parties had presented only legal, not factual, issues, and declared its intent to rule on the pleadings and briefs.
The State moved for a judgment on the pleadings, arguing that because Section 558.031.1, RSMo (2000) provides that an inmate "shall receive credit toward the service of a sentence of imprisonment for all time in prison ... after the offense occurred and before the commencement of the sentence," the MDOC had no discretion to withhold the credit, and thus Appellant had no right to waive this credit. The trial court granted the State's motion for judgment on the pleadings, accepting Appellant's facts as true but finding that because the MDOC had no discretion to give or take away jail-time credit under Section 558.031.1, Appellant could not waive his right to credit.

Discussion
In his sole point on appeal, Appellant argues that the trial court erred in granting judgment on the pleadings in favor of the MDOC, because his motion to waive his right to jail-time credit was sufficient as a matter of law, in that waivers made knowingly, voluntarily, and intelligently should generally be upheld. We disagree.
The question presented in a motion for judgment on the pleadings is whether the moving party is entitled to judgment as a matter of law on the face of the pleadings. State ex rel. Kansas City Symphony v. State, 311 S.W.3d 272, 274 (Mo.App. W.D.2010). The non-moving party's pleadings are treated as admitted *271 for purposes of the motion. Id. Because a judgment on the pleadings addresses a question of law, we review the judgment de novo. Id. As well, Appellant here challenges the trial court's interpretation of Section 558.031, and we review de novo a trial court's statutory interpretation and application. St. Louis County v. Himes, 328 S.W.3d 484, 486 (Mo.App. E.D.2010).
Section 558.031.1 mandates that the time a defendant serves in prison before trial and sentencing is part of his sentence, and that an inmate "shall receive" credit for any time spent in prison before his sentence. The use of the word "shall" in a statute generally prescribes a mandatory duty. State v. Teer, 275 S.W.3d 258, 261 (Mo. banc 2009). In determining whether the use of the word "shall" prescribes a mandatory or directory duty, we look to the context of the statute for legislative intent. Id.
The plain language of Section 558.031.1 imposes the mandate that a defendant receive credit for all time served pending trial and sentencing, and Missouri courts have interpreted this section as a mandatory, administrative, and non-discretionary provision. State ex rel. Nixon v. Dierker, 22 S.W.3d 787, 790 (Mo.App. E.D.2000) (award of jail-time credit was not matter of discretion for trial court, but was matter for MDOC); State ex rel. Jones v. Cooksey, 830 S.W.2d 421, 425 (Mo. banc 1992) (Section 558.031.1 contemplates administrative rather than judicial determination of jail-time credit). Further, the purpose of Section 558.031.1 is to ensure that indigent defendants do not serve a longer sentence than those defendants who can afford bail. Dykes v. Mo. Dep't of Corr., 325 S.W.3d 556, 559 (Mo.App. W.D.2010). Considering both existing judicial interpretation and the statute's purpose, we hold that Section 558.031.1 sets forth a mandatory duty that neither Appellant nor the MDOC is entitled to waive.
Appellant's argument on appeal that the right provided in Section 558.031.1 is a trial right that may be waived like any other trial right is not persuasive. Missouri rules specifically provide for the waiver of trial rights, including the rights to plead not guilty, to confront and cross-examine witnesses, and to not be compelled to incriminate oneself. Rule 24.02. Section 558.031.1, however, does not similarly provide for a waiver. In light of its clear language and the legislative intent to ensure indigent defendants do not serve longer sentences, we decline to read a waiver into the statute that would allow a defendant to, in essence, lengthen his sentence beyond its stated term. See Goings v. Mo. Dep't of Corr., 6 S.W.3d 906, 908 (Mo. banc 1999) (statutes implicating defendant's liberty should be construed strictly against State and in favor of defendant).
Appellant points to dicta in In re Turley suggesting that a defendant might be allowed to waive the jail-time credit under certain circumstances, "if the court is willing to give him such a choice." 496 S.W.2d 865, 867 (Mo.App.1973). First, we note that Turley did not set forth a definite right to waive jail-time credit; rather, it posited that such a waiver could be possible, in the trial court's discretion. Second, we note that Turley addressed Section 546.615, RSMo (1971), which was an earlier version of Section 558.031 and reflected a different statutory scheme. Under Section 546.615, the trial court, not the MDOC, credited a defendant for time spent in jail. Id. at 866. Cases decided under the former process and that posited a waiver that was both discretionary and theoretical, have no bearing on how we *272 interpret the current mandatory administrative scheme.[2]
Point denied.

Conclusion
The judgment of the trial court is affirmed.
MARY K. HOFF and PATRICIA L. COHEN, JJ., concurs.
NOTES
[1]  Appellant asserts that because the U.S. Bureau of Prisons does not offer parole, he will be required to serve 100% of his federal sentence.
[2]  We have reviewed Felts v. Duncan, 34 Fed. Appx. 374 (9th Cir.2002) and Murphy v. Thompson, No. 4:05CV 1062-DJS, 2008 WL 2859144 (E.D.Mo. July 23, 2008), but similarly find them unpersuasive.
