
216 Cal.App.2d 787 (1963)
THE PEOPLE, Plaintiff and Respondent,
v.
CHRISTOPHER ZACCARIA, JR., Defendant and Appellant.
Crim. No. 4193. 
California Court of Appeals. First Dist., Div. Three.  
June 3, 1963.
 Martin N. Pulich, Public Defender, and John D. Nunes and William H. Hoffman, Assistant Public Defenders, for Defendant and Appellant.
 Stanley Mosk, Attorney General, Albert W. Harris, Jr., and Michael R. Marron, Deputy Attorneys General, for Plaintiff and Respondent.
 DEVINE, J.
 On December 30, 1961, at about 1:45 a.m., a man wearing sunglasses entered the Wishing Well Bar in Castro Valley, seated himself at the bar, ordered a beer, and when the bartender brought it, announced that he had a gun, which the bartender and a waitress saw in his lap, and demanded "all your money." The bartender grabbed the gun and punched the man, who fled. The bartender and waitress identified appellant as the would-be robber from photographs and from viewings through a one-way mirror, and the waitress also selected him from a lineup. Appellant told a detective that he was home at 1:45 a.m. on December 30, 1961, but at the trial he testified that he was at a bar, Dell's Place in Union City, at the crucial time, and that he had been in this bar from 12:30 to about 2:10 a.m. He had not mentioned this to the detective. On cross-examination, he admitted that he had told the detective he was at home, but testified that he had not mentioned the time, and he admitted that he might have left Dell's Place at 10 o'clock. He denied having worn sunglasses at any time in December 1961, but the prosecution produced a witness who had given him a lift in an automobile about December 18, 1961, and who testified that appellant was wearing sunglasses. He was convicted of attempt to commit robbery.
 [1a] At the trial, evidence was admitted, for the purpose of impeachment, that appellant had been convicted of a felony, namely, violation of section 11500 of the Health and Safety *789 Code of California. At arraignment, appellant admitted the conviction but denied that it was a felony. The court ruled that it was a felony, and allowed it to be used for impeachment. It is appellant's contention that the prior crime was not a felony but a misdemeanor, because upon conviction he was committed to the California Youth Authority. The prior conviction and commitment occurred in June 1958.
 At the time of the prior conviction, violation of section 11500 of the Health and Safety Code by possession of narcotics, the offense committed by appellant under section 11712 of the Health and Safety Code was punishable by imprisonment in the county jail or in the state prison. Appellant was then under 21 years of age, and the court exercised its jurisdiction to commit him to the California Youth Authority, under section 1731.5 of the Welfare and Institutions Code, instead of sentencing him to either state prison or county jail.
 [2] The determination of the character of the former offense, as felony or misdemeanor, is to be made according to the law at the date of conviction. (In re Harincar, 29 Cal.2d 403 [176 P.2d 58].) Therefore, although the statute, by amendment in 1959, has made offenses which are punishable in the alternative manner, confinement in state prison or county jail or fine, misdemeanors where the court commits the defendant to the Youth Authority (Pen. Code,  17), the amendment is not to be given retroactive effect (People v. Ramsey, 202 Cal.App.2d 856, 859 [21 Cal.Rptr. 406]).
 [3] From 1874 to 1947, section 17 of the Penal Code provided, as it still does, save for the additional matter contained in the 1959 amendment mentioned in the last paragraph, that a felony is a crime punishable with death or by imprisonment in the state prison, that every other crime is a misdemeanor, and that if a crime is punishable either by imprisonment in the state prison or by fine or by imprisonment in the county jail, in the discretion of the court, it shall be deemed a misdemeanor for all purposes after a judgment imposing a punishment other than imprisonment in the state prison. Unless and until another punishment was imposed, therefore, a crime of the hybrid type was and is a felony; so, where imposing sentence is deferred, as by granting of probation, the crime remains a felony. (People v. Banks, 53 Cal.2d 370, 388-391 [1 Cal.Rptr. 669, 348 P.2d 102].) [1b] In 1947, section 17 was amended to add this: "unless the court commits the defendant to the California Youth *790 Authority. Where a court commits a defendant to the California Youth Authority upon conviction of a crime punishable by imprisonment in the state prison or fine or imprisonment in a county jail, in the discretion of the court, the crime shall be deemed a felony until and unless the court, after the person committed has been discharged from control by the California Youth Authority, and only if he was not placed in a state prison by the authority during the period of such control, on application of the person so committed and discharged, makes an order determining that the crime of which he was convicted was a misdemeanor." It will be observed that the alternatively punishable crime remained a felony despite commitment to the Youth Authority, but a process of reducing its status, following discharge, was created. In 1957, the Legislature struck out all of the 1947 amendment, so that the section was restored to the identical form which had existed since 1874, and this was the form of the statute when appellant was convicted in 1958.
 Appellant contends that his commitment to the Youth Authority in 1958 was a punishment, and that because it was a punishment other than in the state prison, the crime was reduced to a misdemeanor Against this contention respondent cites People v. Williams, 27 Cal.2d 220 [163 P.2d 692], in which it was held proper to use, as material for impeachment, defendant's previous commitment to reform school under the provisions of the Juvenile Court Act applicable at that time, May 16, 1941, because defendant had not been sentenced to "penal punishment" (p. 231). Appellant's reply to the Williams case is that under the Juvenile Court Act, commitment to a reform school could be recalled by the superior court, and sentence could then be imposed, and that the Supreme Court in the Williams case did not regard the commitment as imposing punishment because it held punishment in abeyance. Under the Youth Authority Act, and under section 1766 of the Welfare and Institutions Code, the commitment vests in the Authority a power over the person committed so broad that it ranges from permission of liberty under supervision to confinement in state prison. [4] There may be such confinement even though the offense is a misdemeanor, which would not have been punishable, in the court's discretion, by imprisonment in the state prison. (People v. Scherbing, 93 Cal.App.2d 736 [209 P.2d 796].) [5] From the moment of commitment, there can be no recall *791 by the superior court. (People v. Rick, 112 Cal.App.2d 410 [246 P.2d 691].)
 [1c] Appellant urges that there has been no mere suspension, therefore, and that commitment constitutes punishment. We do not agree. In the Williams case, mention was made, to be sure, of the reservation of jurisdiction in the court as negativing immediate punishment by the commitment. The governing factor is the defendant's unchanged status. (People v. Williams, supra, p. 231.) This unchanged status exists unless punishment, as such, other than imprisonment in state prison, is imposed. Thus, the court, in the Williams case, recognized by the use of quotation marks around the term "penal punishment" (at p. 231), which without these marks might seem to be an inadvertent tautology, that there may be custody and discipline of a person committed which is not penal.
 The purpose of the Youth Authority Act is expressed to be "to protect society more effectively by substituting for retributive punishment methods of training and treatment directed toward the correction and rehabilitation of young persons found guilty of public offenses." (Welf. & Inst. Code,  1700.) The act is replete with provisions of rehabilitation, such as those relating to work to be done by persons committed ( 1760.6), forestry camps ( 1760.4), and various modes of correction and treatment ( 1768).
 The argument that custody necessarily is punishment is not sound. The custody which the act authorizes is auxiliary to reform. The fact that the custody may be in a state prison, in cases where incorrigibility has made such confinement necessary, even though the offense could not have been punished by sentence to such imprisonment, as held in the Scherbing case, supra, points to the fact that the restraint is but ancillary to the main purpose of the act, and is not punishment as such.
 It is argued by appellant that when the Legislature, in 1957, removed the matter it had added to Penal Code section 17 in 1947, it intended to reduce alternatively punishable offenses to misdemeanors when commitment to the Youth Authority occurred, because there was eliminated the specific description of such offenses as felonies until the permitted expurgation was made. By repealing the amendment, however, the Legislature simply went back to the original wording of section 17, under which the Williams case had been decided. [6] The Legislature is presumed to have known *792 of the judicial interpretation that had been placed on section 17. (People v. Hallner, 43 Cal.2d 715, 719 [277 P.2d 393].) [1d] Although the Williams case also had to do with the Juvenile Court Act, it would seem logical to infer that, in view of the Williams case, had the Legislature in 1957 intended to reduce all alternatively punishable crimes to misdemeanors on commitment to the Youth Authority, it would have said so. When the Legislature did decide to do so, in 1959, it expressed its purpose clearly.
 Judgment affirmed. Appeal from order denying motion for new trial dismissed.
 Draper, P. J., and Salsman, J., concurred.
