
78 Cal.App.3d 134 (1978)
144 Cal. Rptr. 89
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; PHILIP GONZALES GONZALES, Real Party in Interest.
Docket No. 52412.
Court of Appeals of California, Second District, Division Five.
February 28, 1978.
*136 COUNSEL
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Frederick R. Millar, Jr., and John R. Gorey, Deputy Attorneys General, for Petitioner.
No appearance for Respondent.
Wilbur F. Littlefield, Public Defender, Dennis A. Fischer, James H. Nemeth and G. Keith Wisot, Deputy Public Defenders, for Real Party in Interest.
OPINION
KAUS, P.J.
Real party in interest herein pleaded nolo contendere in respondent court to a charge of unlawful sexual intercourse committed on March 2, 1973. He was placed on probation. On September 20, 1977, he was found to be in violation of probation. Probation was revoked. Respondent sentenced him to state prison for a term of six months to two years. He was credited with having spent 206 days in custody.
The People, after an unsuccessful attempt to persuade respondent court to set aside the judgment insofar as it specified the length of real *137 party's term of imprisonment, filed the present petition for writ of mandate. We issued the alternative writ to determine whether the sentence imposed exceeded respondent's jurisdiction.[1]
(1) The People contend that Penal Code sections 1168, subdivision (b), and 1170, subdivision (a)(2), require a trial court, in sentencing a defendant to state prison for an offense committed before July 1, 1977, to sentence the offender for "the term prescribed by law" under the former indeterminate sentencing law, and that pursuant to Penal Code section 1170.2, subdivisions (a) and (b), the actual term of imprisonment is to be fixed by the Community Release Board (CRB). They rely on People v. Alcala, 74 Cal. App.3d 425 [141 Cal. Rptr. 442].
In declining to vacate the sentence as pronounced, the trial court found that Alcala, supra, was distinguishable in that Alcala had been sentenced before July 1, 1977, and anything the case said about persons sentenced after that date was dictum. The court expressed the belief that as to a sentence pronounced after July 1, 1977, for an offense committed before that date, the recently enacted Uniform Determinate Sentencing Act (the Act) (Sen. Bill No. 42, Stats. 1976, ch. 1139; Assem. Bill No. 476, Stats. 1977, ch. 165) requires the court to fix the sentence, applying the old sentencing law to the extent that the penalty thereunder was less stringent, so as to avoid ex post facto consequences, and otherwise applying the sentence called for under the Act in order to give effect to the ameliorative attitude expressed by the Legislature in enacting it.[2] (In re Estrada, 63 Cal.2d 740 [48 Cal. Rptr. 172, 408 P.2d 948].) The court voiced the further belief that the Legislature could not constitutionally have delegated to CRB the judicial function of fixing the term of imprisonment for persons sentenced after July 1, 1977, for offenses committed prior thereto. Real party has adopted both of these propositions in his opposition to the alternative writ. We cannot agree with either.
The current versions of sections 1168 and 1170 are part of the 1977 revision of the Act. (Assem. Bill No. 476, Stats. 1977, ch. 165.) Section *138 1168 provides: "(a) Every person who commits a public offense, for which any specification of three time periods of imprisonment in any state prison is now prescribed by law shall, unless such convicted person be placed on probation, a new trial granted, or the imposing of sentence suspended, be sentenced pursuant to Chapter 4.5 (commencing with Section 1170) of Title 7 of Part 2. [¶] (b) For any person not sentenced under such provision, but who is sentenced to be imprisoned in the state prison, including imprisonment not exceeding one year and one day, the court imposing the sentence shall not fix the term or duration of the period of imprisonment." Taken alone, section 1168 tells us nothing about the proper sentencing procedure for persons in real party's position; however, when section 1168 is read in conjunction with sections 1170 and 1170.2,[3] as it must be, the legislative scheme becomes clear. Section 1170, subdivision (a)(2), provides that where a choice of three time periods for confinement is specified as punishment for an offense, the trial court shall sentence the defendant to one of the specified time periods unless he "... is sentenced pursuant to subdivision (b) of Section 1168 because he had committed his crime prior to July 1, 1977."[4] Section 1170.2, subdivision (a), provides that CRB shall fix the term of imprisonment "In the case of any inmate who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1170 if he had committed it after July 1, 1977...."[5]
*139 While there are simpler ways of saying that all persons who committed crimes before July 1, 1977, will be sentenced under the indeterminate sentencing law, the conclusion that this was the legislative intent is *140 compelling when the 1977 versions of sections 1170 and 1170.2 are compared with their 1976 counterparts. The 1976 Act clearly provided that determinate sentences were to be given to all persons sentenced after July 1, 1977, whenever the crime was committed. One of the very purposes of the 1977 amendments was to make the date of the criminal act determinative. We quote from the bill analysis of Assembly Bill No. 476, prepared by the Assembly Committee on Criminal Justice, and included as an exhibit to real party's return to the alternative writ. Item 14 on page 5 of the analysis provides: "DATE OF S.B. 42 SENTENCE [¶] S.B. 42: the determinate sentences will apply to those cases sentenced after July 1, 1977. Those sentenced before will be sentenced indeterminately and will receive the retroactive application. [¶] A.B. 476: changes the date from sentencing to the date the offense was committed. Expands the use of retroactive hearings to cover those who will be received `indeterminately' in prison after July 1, 1977 (due to probation violations that could occur in the future, under A.B. 476, there will be defendants received with indeterminate sentences years into the future)." (Italics in original.)
We conclude that the dictum of People v. Alcala, supra, 74 Cal. App.3d 425, is sound; that the Legislature did intend that for defendants sentenced after July 1, 1977, for offenses committed prior thereto, the term of imprisonment be fixed by CRB, not by the trial court.
(2) We turn next to a consideration of whether there is any constitutional impediment to this scheme. The proposition, espoused by *141 respondent and adopted by real party, that allowing CRB to fix such sentences constitutes an unlawful delegation of a judicial function to the executive branch of government, ignores the history of sentencing in this state over the last 60 years. The indeterminate sentencing law was adopted by the Legislature in 1917. Its constitutionality was first sustained by the California Supreme Court in 1918 against a challenge that it infringed the doctrine of separation of powers. The court stated: "In answering the claim that the authority vested by the indeterminate sentence law in the board of prison directors is a delegation of either legislative or judicial powers to an executive body, it is pointed out that the legislative function is filled by providing the sentence which is to be imposed by the judicial branch upon the determination of the guilt of the offender. This is done by the enactment of the indeterminate sentence law. The judicial branch of the government is intrusted with the function of determining the guilt of the individual and of imposing the sentence provided by law for the offense of which the individual has been found guilty. The actual carrying out of the sentence and the application of the various provisions for ameliorating the same are administrative in character and properly exercised by an administrative body." (In re Lee, 177 Cal. 690, 693 [171 P. 958].) This ruling was repeatedly affirmed over the years. (See e.g., In re Wells, 35 Cal.2d 889, 893 [221 P.2d 947]; In re Larsen, 44 Cal.2d 642, 647-648 [283 P.2d 1043]; In re Lynch, 8 Cal.3d 410, 417 [105 Cal. Rptr. 217, 503 P.2d 921].) A sentence to state prison under the indeterminate sentencing law was deemed to be a sentence for the maximum term prescribed by law under the cited cases. Any earlier release date fixed by the Adult Authority or its predecessor agencies was supposed to reflect a recognition of the prisoner's efforts at rehabilitation.
A defendant sentenced to state prison after July 1, 1977, for an offense committed before that date, is sentenced in precisely the same manner and according to the same principles as were previously applied under the indeterminate sentencing law, except that under section 1170.2, subdivision (b), of the Penal Code, CRB, in deciding whether to reduce a defendant's term below the maximum, may consider the ameliorative effects of the Act on the length of sentences generally and the legislatively expressed desire for uniformity in the treatment of offenders. This alternation in the factors to be considered by the administrative body charged with fixing and enforcing legislatively circumscribed and judicially imposed sentences is insufficient to render unconstitutional as *142 to those defendants still falling within its purview a system which has been sustained by the courts for over 60 years.[6]
(3) The two remaining problems alluded to by the trial court, the ex post facto issue and retroactivity, are adequately addressed by the Act. Defendants in real party's position are protected against potential ex post facto consequences of the Act by subdivision (c) of Penal Code section 1170.2 which directs that: "Nothing in this section shall be deemed to keep an inmate in the custody of the Department of Corrections for a period of time longer than he would have been kept in its custody under the provisions of law applicable to him prior to July 1, 1977." (Stats. 1977, ch. 165.)
(4) As to the question of retroactivity, there is no constitutional impediment to the Legislature's enacting a statute which operates prospectively only. "The problem, of course, is one of trying to ascertain the legislative intent  did the Legislature intend the old or new statute to apply? Had the Legislature expressly stated which statute should apply, its determination, either way, would have been legal and constitutional." (In re Estrada, supra, 63 Cal.2d 740, 744.) The legislative intent with respect to the Act is fully, if laboriously, set forth in the Act, particularly in subdivision (b) of Penal Code section 1170.2. Blanket retroactivity, therefore, is inapplicable. (People v. Alcala, supra, 74 Cal. App.3d 425.)
(5) Real party claims that it constitutes a denial of equal protection to treat defendants sentenced after July 1, 1977, differently based upon whether their offense was committed before or after that date. Our conclusion that the Legislature had a choice as to whether it would apply the Act prospectively or retroactively is a partial answer to this contention. We would further note that all legally defined time periods  such as, the time for commencing an action, for service and return of summons, for bringing a case to trial, for setting aside a judgment, or for taking an appeal  as well as effective dates of statutes, are arbitrary in the sense that other periods or dates might have been chosen. This is unavoidable. Given the Legislature's power to make the Act prospective, it has two logical choices in selecting the effective date of the Act: the date the offense was committed or the date the offender was sentenced. As we have seen, in 1976 the Legislature opted for the latter alternative, *143 but abandoned it for the former in 1977. While we are not concerned with the wisdom of either choice, it does seem eminently more reasonable to relate the sentence to the time of the offense than to the fortuity of the time of sentencing. This is dramatically illustrated by the facts of this very case, in which the offense was committed several years before the Act was passed, let alone went into effect. Fixing the day the offense was committed as the watershed results in an entirely reasonable classification and does not deny equal protection to those whose offenses predate July 1, 1977.
(6) The legislative intent with respect to sentences for pre-July 1, 1977, offenses being clear, and there being no constitutional infirmity in the Act which precludes implementation of that intent, respondent abused its authority in sentencing real party to a term of six months to two years. "When a court pronounces a sentence which is unauthorized by the Penal Code, that sentence must be vacated and a proper sentence imposed whenever the mistake is appropriately brought to the attention of the court. [Citations.] If a trial court refuses to correct an illegal sentence, the People may obtain relief in the appellate court by writ of mandate. [Citations.]" (People v. Massengale, 10 Cal. App.3d 689, 693 [89 Cal. Rptr. 237].) Upon vacation of the unauthorized sentence, a proper judgment may be imposed, even though it is more severe than the sentence originally imposed. (People v. Serrato, 9 Cal.3d 753 [109 Cal. Rptr. 65, 512 P.2d 289].)
Let a peremptory writ of mandate issue directing respondent to vacate its order of September 20, 1977, sentencing real party to state prison for a term of six months to two years in that matter entitled People of the State of California v. Philip Gonzales Gonzales, Los Angeles Superior Court No. A516305, and to conduct a new sentencing hearing. If respondent thereafter concludes that a state prison sentence is appropriate, it shall sentence real party to state prison for the term prescribed by law.
Stephens, J., and Ashby, J., concurred.
NOTES
[1]  The trial judge has been following the same sentencing procedure for all defendants sentenced to prison after July 1, 1977, for offenses committed before that date. To date the People have filed a total of 18 similar petitions with this court which await our decision in the instant matter.
[2]  The six-month minimum term imposed on real party herein derives from former sections 18a and 264 of the Penal Code. The two-year maximum sentence pronounced by respondent represents the middle term under current section 264.
[3]  Also amended by Statutes 1977, chapter 165.
[4]  Subdivision (a)(2) of section 1170, in its entirety, reads as follows: "In any case in which the punishment prescribed by statute for a person convicted of a public offense is a term of imprisonment in the state prison of 16 months, two or three years; two, three or four years; three, four or five years; five, six, or seven years, or any other specification of three time periods, the court shall sentence the defendant to one of the terms of imprisonment specified unless such convicted person is given any other disposition provided by law, including a fine, jail, probation or the suspension of imposition or execution of sentence or is sentenced pursuant to subdivision (b) of Section 1168 because he had committed his crime prior to July 1, 1977. In sentencing the convicted person, the court shall apply the sentencing rules of the Judicial Council. The court, unless it determines that there are circumstances in mitigation of the punishment prescribed, shall also impose any other term which it is required by law to impose as an additional term. Nothing in this article shall affect any provision of law which imposes the death penalty, which authorizes or restricts the granting of probation or suspending the execution or imposition of sentence, or expressly provides for imprisonment in the state prison for life. In any case in which the amount of preimprisonment credit under Section 2900.5 or any other provision of law is equal to or exceeds any sentence imposed pursuant to this chapter, the entire sentence, including any period of parole under Section 3000, shall be deemed to have been served and the defendant shall not be actually delivered to the custody of the Director of Corrections. However, any such sentence shall be deemed a separate prior prison term under Section 667.5, and a copy of the judgment and other necessary documentation shall be forwarded to the Director of Corrections."
[5]  Section 1170.2, in toto, provides:

"(a) In the case of any inmate who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1170 if he had committed it after July 1, 1977, the Community Release Board shall determine what the length of time of imprisonment would have been under Section 1170 without consideration of good-time credit and utilizing the middle term of the offense bearing the longest term of imprisonment of which the prisoner was convicted increased by any enhancements justified by matters found to be true and which were imposed by the court at the time of sentencing for such felony. Such matters include: being armed with a deadly or dangerous weapon as specified in Section 211a, 460, 3024, or 12022 prior to July 1, 1977, which may result in a one-year enhancement pursuant to the provisions of Section 12022; using a firearm as specified in Section 12022.5 prior to July 1, 1977, which may result in a two-year enhancement pursuant to the provisions of Section 12022.5; infliction of great bodily injury as specified in Section 213, 264, or 461 prior to July 1, 1977, which may result in a three-year enhancement pursuant to the provisions of Section 12022.7; any prior felony conviction as specified in any statute prior to July 1, 1977, which prior felony conviction is the equivalent of a prior prison term as defined in Section 667.5, which may result in the appropriate enhancement pursuant to the provisions of Section 667.5; and any consecutive sentence.
"(b) If the calculation required under subdivision (a) is less than the time to be served prior to a parole date set prior to July 1, 1977, or if a release date had not been set, the Community Release Board shall establish the prisoner's parole date, subject to subdivision (d), on the date calculated under subdivision (a) unless at least two of the members of the Community Release Board after reviewing the prisoner's file, determine that due to the number of crimes of which the prisoner was convicted, or due to the number of prior convictions suffered by the prisoner, or due to the fact that the prisoner was armed with a deadly weapon when the crime was committed, or used a deadly weapon during the commission of the crime, or inflicted or attempted to inflict great bodily injury on the victim of the crime, the prisoner should serve a term longer than that calculated in subdivision (a), in which event the prisoner shall be entitled to a hearing before a panel consisting of at least two members of the Community Release Board as provided for in Section 3041.5. The Community Release Board shall notify each prisoner who is scheduled for such a hearing within 90 days of July 1, 1977, or within 90 days of the date the prisoner is received by or returned to the custody of the Department of Corrections, whichever is later. The hearing shall be held before April 1, 1978, or within 120 days of receipt of the prisoner, whichever is later. The board may by resolution extend this period an additional 90 days. However, such resolution shall have no force or effect if vetoed by resolution of either house of the Legislature. It is the intent of the Legislature that the hearings provided for in this subdivision shall be accomplished in the most expeditious manner possible. At such hearing the prisoner shall be entitled to be represented by legal counsel, a release date shall be set, and the prisoner shall be informed in writing of the extraordinary factors specifically considered determinative and on what basis the release date has been calculated. In fixing a term under this section the board shall be guided by, but not limited to, the term which reasonably could be imposed on a person who committed a similar offense under similar circumstances on or after July 1, 1977, and further, the board shall be guided by the following finding and declaration hereby made by the Legislature: that the necessity to protect the public from repetition of extraordinary crimes of violence against the person is the paramount consideration.
"(c) Nothing in this section shall be deemed to keep an inmate in the custody of the Department of Corrections for a period of time longer than he would have been kept in its custody under the provisions of law applicable to him prior to July 1, 1977. Nothing in this section shall be deemed to require the release of an inmate sentenced to consecutive sentences under the provisions of law applicable to him prior to July 1, 1977, earlier than if he had been sentenced to concurrent sentences.
"(d) In the case of any prisoner who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1170 if the felony was committed on or after July 1, 1977, the good behavior and participation provisions of Article 2.5 (commencing with Section 2930) of Chapter 7 of Title 1 of Part 3 shall apply from July 1, 1977, and thereafter.
"(e) In the case of any inmate who committed a felony prior to July 1, 1977, who would have been sentenced under Section 1168 if the felony was committed on or after July 1, 1977, the Community Release Board shall provide for release from prison as provided for by this code.
"(f) In the case of any inmate who committed a felony prior to July 1, 1977, the length, conditions, revocation, and other incidents of parole shall be the same as if the prisoner had been sentenced for an offense committed on or after July 1, 1977.
"(g) Nothing in this chapter shall affect the eligibility for parole under Article 3 (commencing with Section 3040) of Chapter 8 of Title 1 of Part 3 of an inmate sentenced pursuant to Section 1168 as operative prior to July 1, 1977, for a period of parole as specified in subdivision (b) of Section 3000."
[6]  The validity of the Act has been upheld against a challenge that it constituted a legislative usurpation of the executive's commutation power. (Way v. Superior Court, 74 Cal. App.3d 165 [141 Cal. Rptr. 383].)
