Former Welfare and Institutions Code section 731, subdivision (c) authorized the juvenile court to commit a ward to the DJJ for a period not to exceed “the maximum term of imprisonment that could be imposed upon an adult for the same offense.” (Former § 731, subd. (c), italics added.) However, Senate Bill No. 823 (2019-2020 Reg. Sess.) amended the statute to limit the maximum time of confinement to “the middle term of imprisonment that could be imposed upon an adult convicted of the same offense.” In this case, the juvenile court calculated the minor’s maximum time of confinement in accordance with former section 731, subdivision (c). Thus, the Court of Appeal remanded the matter for the juvenile court to redetermine the minor’s maximum time of confinement and to prepare a corrected record of commitment.