
92 Cal.App.3d 978 (1979)
155 Cal. Rptr. 330
THE PEOPLE, Plaintiff and Respondent,
v.
HERMAN WADSWORTH, Defendant and Appellant.
Docket No. 33569.
Court of Appeals of California, Second District, Division Four.
May 14, 1979.
*979 COUNSEL
Tibor I. Toczauer, under appointment by the Court of Appeal, for Defendant and Appellant.
George Deukmejian, Attorney General, Jack R. Winkler, Robert H. Philibosian, Chief Assistant Attorneys General, S. Clark Moore, Assistant Attorney General, Lawrence P. Scherb II, William R. Pounders and Ronald N. Ito, Deputy Attorneys General, for Plaintiff and Respondent.
*980 OPINION
FILES, P.J.
This appeal is brought here on behalf of a person who was committed to a state hospital by reason of a finding of not guilty by reason of insanity, and who has apparently been in confinement for a longer time than the term which he would have served if he had been sane.
By information filed February 13, 1973, appellant was charged with having committed a burglary. On March 28, 1973, the court determined that he was then incompetent to stand trial and committed him to the Department of Mental Hygiene. Upon a finding that he had regained his sanity, criminal proceedings were resumed on November 14, 1973. Appellant was eventually found to have committed the charged offense. The court did not specify the degree of the crime and respondent concedes that it should be deemed to be of the second degree. The trial court then found that appellant was not guilty by reason of insanity and on January 9, 1974, committed him to the Department of Mental Hygiene for placement in a state hospital pursuant to Penal Code section 1026. On January 28, 1978, the superior court ordered him paroled. On August 18, 1978, after receiving a report from appellant's parole supervisor, the court revoked parole and ordered appellant returned to Patton State Hospital pursuant to Welfare and Institutions Code section 7375, subdivision (e), for further inpatient treatment. He has appealed from that order.
During the pendency of this appeal, our Supreme Court filed its opinion in the case of In re Moye (1978) 22 Cal.3d 457, 467 [149 Cal. Rptr. 491, 584 P.2d 1097]. That opinion states: "Specifically we hold that principles of equal protection require (subject to the availability of either an extended commitment as outlined below, or a civil commitment under the LPS act) that persons committed to a state institution following acquittal of a criminal offense on the ground of their insanity cannot be retained in institutional confinement beyond the maximum term of punishment for the underlying offense to which, but for their insanity, they would have been convicted. To the extent practicable, and in the absence of further legislation applicable to commitments under Penal Code section 1026, calculation of the maximum term of punishment should be made in accordance with the principles expressed in section 6316.1 of the Welfare and Institutions Code."
(1) When appellant was before the superior court on his parole revocation hearing, his attorney, anticipating what was later decided in *981 Moye, asked the court to discharge appellant upon the ground that he had been in confinement longer than the term of punishment which would have been enforced if he had been sane. That contention now has merit in the light of the Moye opinion.
The Legislature has not enacted any statute creating a procedure for carrying out the limitation which the Moye decision requires on constitutional grounds. We therefore turn to "the principles expressed in section 6316.1" for guidance.
That section, which became effective July 1, 1977, prescribes a maximum term of commitment for a person who has been found guilty of a crime and committed to a state hospital for treatment as a mentally disordered sex offender. This section carries out the policy that persons so committed shall not be kept in actual custody longer than "the maximum term of commitment" which could have been imposed for the offense of which he had been convicted.
Subdivision (a) of section 6316.1 requires that in the case of a person who committed a felony on or after July 1, 1977, the trial court shall state in the commitment order the maximum term of confinement. Subdivision (b) provides that in the case of a person who committed a felony prior to July 1, 1977, the Community Release Board shall determine the maximum term under the standards set forth in that subdivision.[1]
*982 The procedural distinction between crimes committed before and after July 1, 1977, is consistent with the distinction made in the determinate sentence law which took effect July 1, 1977. (See Pen. Code, §§ 1168, 1170, 1170.2.)
That section is not itself applicable to persons committed as not guilty by reason of insanity. But the principle expressed in the statute is that there shall be a limitation, computed in a certain way.
In the Moye case the petitioner was denied any relief because it appeared that he had not been confined as long as the constitutionally permissible maximum. But the Moye opinion does not supply the answer to many questions which may arise in adapting the relevant "principles" to a person found not guilty by reason of insanity. There is an obvious need for a statute which will specify the standards and create the procedures by which the constitutional limitations on such a commitment may be carried out. Until that is done courts will be required to deal with the problems as they arise.
Penal Code sections 1026, 1026a and 1026.1, and Welfare and Institutions Code section 7375 provide statutory authority for the confinement and treatment of a person found not guilty by reason of insanity in a hospital or other mental health facility. These statutes require the committing court to decide when the person shall be released. While this statutory system exists, we should not expect the hospital authorities to release a patient on constitutional grounds without a court order.
The brief of the Attorney General argues that the Community Release Board must set the term for appellant, and that, since the record does not show that such board action has taken place, the superior court's order should be affirmed. We do not interpret Moye as requiring board action as a condition of release.
The Moye decision is based upon a constitutional principle. The Supreme Court reasoned that the Constitution placed a limitation upon the length of time a person may be held in confinement upon a finding of not guilty by reason of insanity. It follows that a trial court errs in sending a person back to the hospital for additional confinement beyond the constitutional maximum.
*983 When a person who has been committed under Penal Code section 1026 is back before the court for further proceedings, if the court has not theretofore determined "the maximum term of commitment" it should do so "in accordance with the principles expressed in [Welf. & Inst. Code] section 6316.1."
The order is reversed.
Kingsley, J., and Alarcon, J., concurred.
A petition for a rehearing was denied June 8, 1979, and respondent's petition for a hearing by the Supreme Court was denied July 25, 1979.
NOTES
[1]  Welfare and Institutions Code section 6316.1, subdivision (b):

"(b) In the case of a person found to be a mentally disordered sex offender who committed a felony prior to July 1, 1977, who could have been sentenced under Section 1168 or 1170 of the Penal Code if the offense were committed after July 1, 1977, the Community Release Board shall determine the maximum term of commitment which could have been imposed under subdivision (a), and the person may not be kept in actual custody longer than the maximum term of commitment, except as provided in Section 6316.2.
"In fixing a term under this section, the board shall utilize the upper term of imprisonment which could have been imposed for the offense or offenses of which the defendant was convicted, increased by any additional terms which could have been imposed based on matters which were found to be true in the committing court. However, if at least two of the members of the board after reviewing the person's file determine that a longer term should be imposed for the reasons specified in Section 1170.2 of the Penal Code, a longer term may be imposed following the procedures and guidelines set forth in Section 1170.2 of the Penal Code, except that any hearings deemed necessary by the board shall be held before April 1, 1978. Within 90 days of July 1, 1977, or of the date the person is received by the State Department of Health, whichever is later, the Community Release Board shall provide each person committed pursuant to Section 6316 with the determination of his maximum term of commitment or shall notify such person that he will be scheduled for a hearing to determine his term.
"Within 20 days following the determination of the maximum term of commitment, the board shall provide the person committed, the prosecuting attorney, the committing court, and the State Department of Health with a written statement setting forth the maximum term of commitment, the calculations, the statements, the recommendations, and any other materials considered in determining the maximum term."
