
93 Cal.App.2d 497 (1949)
In re ELLSWORTH CHIAPETTO, on Habeas Corpus.
Crim. No. 2616. 
California Court of Appeals. First Dist., Div. One.  
Sept. 2, 1949.
 George T. Davis and Kenyon C. Keller for Petitioner.
 Fred N. Howser, Attorney General, Clarence A. Linn, Deputy Attorney General, Edmund G. Brown, District Attorney, and Elton G. Lawless, Deputy District Attorney, for Respondent.
 WARD, J.
 The petitioner for writ of habeas corpus was imprisoned by virtue of a judgment and commitment dated August 25, 1948, for a misdemeanor, i. e., violating section 702 of the Welfare and Institutions Code. The section is part of article 6 of the same code which sets forth the jurisdiction of the juvenile court, defines "Contributing to delinquency of minor" and provides penalties for certain violations. The present judgment and commitment order that "Ellsworth Chiapetto be punished by imprisonment in the County Jail ... for the term of One (1) year and nine (9) months."
 The petition, without denial by the attorney general or the district attorney, who appear jointly for the People of the State of California, alleges "That said Ellsworth Chiapetto has actually been confined in the County Jail for a period of ten months and nineteen days since the date of the commitment; that in accordance with the provisions of Penal Code, Section 4019, the San Francisco County Board of Parole Commissioners have by affirmative action granted the said Ellsworth Chiapetto good time credits on his sentence at the rate of five days for each month he has served or a total credit of in excess of fifty days; that said good time credits have not been forfeited by any action of the said Ellsworth Chiapetto or by the San Francisco Board of Parole Commissioners." From the foregoing allegation it must be concluded that petitioner has served in excess of the equivalent of one year.
 [1] The maximum term of imprisonment on conviction of contributing to juvenile delinquency is two years in the county jail (Welf. & Inst. Code,  702). This penalty clause is based on section 21 of the Juvenile Court Law (Stats. 1915, ch. 631, as amended 1921, ch. 504) but was modified by Penal Code, section 19a, which provides that "In no case shall any person sentenced to confinement in a county or city jail on conviction of misdemeanor ... or for any reason, be committed for a period in excess of one year. ..." (Italics added.) The defendant in this case was not committed to a state penal farm or a state institution. (See People v. Phair, *499 137 Cal.App. 612 [31 P.2d 421]; People v. Lewis, 13 Cal.2d 280 [89 P.2d 388].) Section 19a was enacted in 1933 and amended in 1941 (Stats. 1933, ch. 848; Stats. 1941, ch. 552), subsequent to the enactment of the penalty clause covering the offense of contributing to the delinquency of a minor.
 The codification of the Juvenile Court Law as part of the Welfare and Institutions Code (Stats. 1937, ch. 369) is a mere restatement of the previous statute, insofar as the provisions relate to the same subject matter and are substantially the same. (Welf. & Inst. Code,  2.) The penalty clause in section 21 of the Juvenile Court Law and that in section 702 of the Welfare and Institutions Code are identical as applied to the question presented by this petition. The amendment in 1945 (Stats. 1945, ch. 1234) to include a new violation did not alter the penal clause in any manner affecting the present problem. In the enactment of a new provision by amendment of a part of the statute, "The portions which are not altered are to be considered as having been the law from the time when they were enacted, and the new provisions are to be considered as having been enacted at the time of the amendment." (Gov. Code,  9605.)
 It must be determined that the penal provision of Welfare and Institutions Code, section 702, generally referred to as Juvenile Court Law, section 21, is repealed to the extent that the confinement in a county or city jail is limited to only one year.
 Pending the hearing the petitioner was released on bail. The petitioner is discharged and the bail exonerated.
 Peters, P. J., and Bray, J., concurred.
