
170 Cal.App.3d 756 (1985)
216 Cal. Rptr. 295
THE PEOPLE, Plaintiff and Respondent,
v.
JOHNNIE JAMES DIAS, Defendant and Appellant.
Docket No. E000949.
Court of Appeals of California, Fourth District, Division Two.
July 29, 1985.
*758 COUNSEL
Albert E. Hirst III, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Robert M. Foster, John W. Carney and Jay M. Bloom, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
RICKLES, J.
Defendant Johnnie James Dias has appealed from an order extending his commitment as a mentally disordered sex offender (MDSO) for a period of two years. The contentions he has raised on appeal are: (1) the court erred in failing to follow the procedures for a "slow plea" prescribed by Bunnell v. Superior Court (1975) 13 Cal.3d 592 [119 Cal. Rptr. 302, 531 P.2d 1086]; (2) his commitment could not be extended without a finding of amenability to treatment; and (3) the petition for extended commitment was not timely filed and therefore the order appealed from is void.

FACTS
Defendant was convicted of committing a lewd and lascivious act upon a child under the age of 14 years (Pen. Code, § 288). The offense was committed in September 1973 and defendant was convicted after a court trial in September 1974. Criminal proceedings were suspended, defendant was found to be an MDSO, and he was committed for treatment.
In 1977, defendant's maximum term of commitment under former section 6316.1 of the Welfare and Institutions Code was calculated and found to be eight years, less applicable credits.[1] Based on this calculation, defendant's projected release date was November 12, 1981.
On December 5, 1977, defendant was transferred from Patton State Hospital to Mission Hills Sanitarium, a locked facility. He remained there until August 31, 1978, when he was transferred to Beverly Manor Convalescent Hospital. On May 14, 1980, defendant was returned to Patton State Hospital.
Defendant's release date was recalculated on the theory he had been an outpatient from Patton State Hospital while at Mission Hills Sanitarium and *759 Beverly Manor Convalescent Hospital and was not entitled to credit against his maximum term of commitment for periods while on outpatient status. Defendant's new release date was set at April 21, 1984.
A petition for extended commitment under former section 6316.2 was filed by the prosecuting attorney on August 30, 1983. Defendant moved to dismiss the proceedings, arguing that the petition was untimely (an issue raised on this appeal) and that legislation prospectively abolishing the MDSO system had deprived the court of jurisdiction to extend his commitment (an issue decided adversely to defendant in Baker v. Superior Court (1984) 35 Cal.3d 663 [200 Cal. Rptr. 293, 677 P.2d 219]). The motion to dismiss was heard and denied.
Defendant filed a separate motion to require a finding of amenability to treatment as a necessary condition for an order of extended commitment. This motion was also denied. Defendant waived trial by jury and the matter was tried to the court. The prosecution's case consisted of the testimony of two psychiatrists who said defendant was suffering from a mental illness and presented a substantial danger of bodily harm to others. Defendant did not present any affirmative evidence. The trial court granted the petition and ordered defendant's commitment extended for a period of two years.

DISCUSSION[*]

I
.... .... .... .... .... .... .

III
Under former section 6316.1 (which continues to apply to persons like defendant who were committed as MDSO's before repeal of the MDSO system), an MDSO "may not be kept in actual custody longer than the maximum term of commitment, except as provided in Section 6316.2 [i.e., by an order for extended commitment]." (Italics supplied.) Commenting on this provision, the Supreme Court observed: "... the term `actual custody' in section 6316.1 does not include any periods of outpatient supervision in determining the maximum period of confinement." (In re Moye, supra, 22 Cal.3d 457, 464.) No authority or reasoning was given in support of this statement, the court apparently considering it self-evident.
*760 (1a) Defendant contends that while he was confined in Mission Hills Sanitarium, a locked facility, and in Beverly Manor Convalescent Hospital, he was in "actual custody" within the meaning of former section 6316.1 and was not an "outpatient" as that term was used in Moye. Accordingly, defendant maintains, the time spent in those facilities must be credited against the maximum period of confinement, with the result that the petition for extended commitment was not filed until after the commitment had expired. We agree.
We have been unable to find any statutory definition of the term "outpatient." (2) In common understanding, an outpatient is one who does not reside in the place of treatment. In legal terms, as we will demonstrate, an outpatient is one who enjoys conditional liberty similar to that enjoyed by a probationer or parolee. We are persuaded the Supreme Court had this understanding in mind when it used the term in Moye and could not have meant it to apply to a person confined 24 hours per day in a locked facility.
The term "outpatient" is used to describe the status of persons conditionally released from the California Rehabilitation Center. The term which had been previously used to describe the same status was "parole." (In re Trummer (1964) 60 Cal.2d 658, 661, fn. 3 [36 Cal. Rptr. 281, 388 P.2d 177].) Outpatient status has also been analogized to probation after conviction for a criminal offense. (People v. Jasso (1969) 2 Cal. App.3d 955, 964 [82 Cal. Rptr. 229].) A CRC outpatient has "conditional liberty" and "may lead a relatively normal life." (In re Bye (1974) 12 Cal.3d 96, 101-102 [115 Cal. Rptr. 382, 524 P.2d 854].) Consequently, outpatient status may not be revoked without notice and hearing. (Id., at pp. 100-112; In re Anderson (1977) 73 Cal. App.3d 38, 48 [140 Cal. Rptr. 546].) One who is granted outpatient status is said to be "released" and when the status is revoked the person is "reconfined." (E.g., In re Moye, supra, 22 Cal.3d at pp. 460-461; In re Dalton (1981) 117 Cal. App.3d 521, 523 [172 Cal. Rptr. 783].)
Outpatients normally choose their own place of residence, either alone or with friends or family. (E.g., People v. Myers (1972) 6 Cal.3d 811, 814-815 [100 Cal. Rptr. 612, 494 P.2d 684]; People v. Schnaible (1985) 165 Cal. App.3d 275, 276 [211 Cal. Rptr. 530]; People v. Guerrero (1978) 85 Cal. App.3d 572, 577-578 [149 Cal. Rptr. 555]; People v. Jasso, supra, 2 Cal. App.3d at p. 959.)[2] An outpatient may also be "released to" a halfway house. (E.g., In re Marks (1969) 71 Cal.2d 31, 35 [77 Cal. Rptr. 1, 453 P.2d 441].)
*761 An outpatient is presumed to be free from custody. For example, in a case where the issue was whether an NGI could be confined in jail pending restoration-to-sanity proceedings, the court remarked in the course of the discussion: "No custody arrangement is necessary for an applicant who has been admitted to outpatient status or who is on parole from the institution. (See Welf. & Inst. Code, § 7375.) That person need only walk into the courtroom under his own power." (In re Lee (1978) 78 Cal. App.3d 753, 758 [144 Cal. Rptr. 528].)
Our conclusion that the term "outpatient" in Moye means a person who is free of institutional confinement is bolstered by the recent case of People v. Hawkins (1983) 139 Cal. App.3d 984. Referring to computation of the release date of an NGI, the court said: "It is true, of course, that even after a committee's initial maximum period of confinement has been established (Pen. Code, § 1026.5, subds. (a)(1) and (a)(2)), its exact expiration date cannot be known in advance since the time, if any, he may spend in a noncustodial outpatient status cannot be predetermined." (At p. 987, italics supplied.) The use of the phrase "noncustodial outpatient status" necessarily means that time spent in "custodial outpatient status" would be credited against the maximum term of confinement.
Support can also be found in People v. Saville (1982) 138 Cal. App.3d 970 [188 Cal. Rptr. 376]. An NGI was "at various times granted outpatient status, which was in turn periodically curtailed on account of respondent's unacceptable behavior. On some of these occasions of curtailment, respondent, rather than being returned to Atascadero, was hospitalized in other institutions under provisions of Welfare and Institutions Code sections 5150 and 5250, part of the so-called Lanterman-Petris-Short Act (LPS)." (At p. 972, fn. omitted.) The court concluded that the NGI was entitled to credit against the maximum term of confinement for all time spent in institutions other than Atascadero.
(1b) Under Penal Code section 2900.5, credit is given against a sentence for "all days of custody" including time spent in a "halfway house, rehabilitation facility, hospital ... or similar residential institution." Thus if defendant's MDSO commitment had been terminated and he had been sentenced to prison for the 1973 offense, he would have been entitled to credit for the years he spent in Mission Hills Sanitarium and Beverly Manor Convalescent Hospital. (See People v. Schnaible, supra, 165 Cal. App.3d at pp. 277-278; People v. Mobley (1983) 139 Cal. App.3d 320; 322-323 [188 Cal. Rptr. 583]; People v. Rodgers (1978) 79 Cal. App.3d 26, 31-32 [144 Cal. Rptr. 602]; In re Wolfenbarger (1977) 76 Cal. App.3d 201, 205-206 [142 Cal. Rptr. 745].) Former section 6316.1 expressly incorporates the provisions of Penal Code section 2900.5, stating that in computing the maximum *762 term of commitment "any applicable credits as defined by Section 2900.5 of the Penal Code" must be deducted.
The Attorney General argues that no credit should be given for time in outpatient status, even in a locked facility, because otherwise difficulties would be encountered trying to decide whether particular living arrangements involving moderate restraints constituted actual custody. The same problem arises under Penal Code section 2900.5 and has not proven insurmountable.
The Attorney General also argues that a determination regarding actual custody cannot be made on the present record because the evidence is insufficient. We disagree. Under Penal Code section 2900.5, time spent in any residential facility, whether public or private, for the purpose of treatment, rehabilitation, observation, restraint, or supervision must be credited. The evidence here is sufficient to show that both Mission Hills Sanitarium and Beverly Manor Convalescent Hospital were residential facilities and places of treatment or at least observation and supervision. Accordingly, defendant is entitled to credit for time spent in both institutions.
(3a) This brings us to the question whether the untimeliness of the petition for extended commitment makes the resulting order invalid.
Former section 6316.2 provided that a petition for extended commitment "shall be filed no later than 90 days before the expiration of the original commitment," and that "trial shall commence no later than 30 days prior to the time the patient would otherwise have been released." Similar time limits for extended commitment of NGI's are found in subdivision (b) of Penal Code section 1026.5.
(4) Although these time limits are not jurisdictional (People v. Dougherty (1983) 143 Cal. App.3d 245, 247 [191 Cal. Rptr. 668]; People v. Echols (1982) 138 Cal. App.3d 838, 841-842 [188 Cal. Rptr. 328]; In re Johns (1981) 119 Cal. App.3d 577, 580-581 [175 Cal. Rptr. 443]), an order for extended commitment will generally be void if the petition was filed after the commitment expired (People v. Saville, supra, 138 Cal. App.3d at p. 974; People v. Pacini (1981) 120 Cal. App.3d 877, 891 [174 Cal. Rptr. 820]) or so close to the expiration date that defendant does not have a fair opportunity to prepare for trial (People v. Dougherty, supra, at pp. 247-249; People v. Hawkins, supra, 139 Cal. App.3d at pp. 987-988; People v. Hill (1982) 134 Cal. App.3d 1055, 1059-1060 [185 Cal. Rptr. 64]). However, an order for extended commitment will be valid even though the petition was filed after expiration of the commitment if, as a result of legislative or judicial change, the term expired without a reasonable opportunity *763 to prepare and file the petition. (Jackson v. Superior Court (1983) 140 Cal. App.3d 526, 533-534 [189 Cal. Rptr. 491]; People v. Balderas (1980) 104 Cal. App.3d 942, 948 [164 Cal. Rptr. 275]; People v. Superior Court (Rigg) (1978) 80 Cal. App.3d 407, 415-416 [145 Cal. Rptr. 711].)
(3b) The record before us contains no hint of negligent or intentional wrongdoing by the persons charged with determining defendant's release date. The error resulted from a mistake of law on an issue where the relevant statute was not explicit and there was no controlling judicial decision directly on point. In this situation, we do not believe the error should be fatal to the extended commitment order. Given the evidence showing defendant continues to present a substantial danger of bodily harm to others, neither defendant nor the public would benefit by defendant's release at this time.
We recognize that our conclusion may be in conflict with People v. Saville, supra, 138 Cal. App.3d 970. There, as here, a petition for extended commitment was untimely because time spent away from a state hospital but in a locked facility was erroneously not credited against a maximum term of confinement. Faced with a contention that the error should be considered excusable, the reviewing court stated: "We regard the claim as unmeritorious in view of the fact that doubts as to dates of termination reasonably may be resolved in terms of earlier filings for the purpose predicated on the particular facts of the case, without impairment of the scope of the extention [sic]." (At p. 974, fn. 3.)
In the present case, we conclude that the record establishes good cause for relief from the time limits of former section 6316.2. Accordingly, the denial of defendant's motion to dismiss the petition was not error.
The order appealed from is affirmed.
Kaufman, Acting P.J., and McDaniel, J., concurred.
The petitions of both parties for review by the Supreme Court were denied November 20, 1985.
NOTES
[*]   See footnote, post, page 759.
[1]  All statutory references in this opinion are to the Welfare and Institutions Code unless otherwise stated.
[*]   Parts I and II are not published, as they do not meet the standards for publication under rule 976(b) of the California Rules of Court.
[2]  Section 7355 provides that a person going on outpatient status must be given clothing and money "to defray the necessary expenses of such patient ... until he can reach his relatives or friends, or find employment to earn a subsistence."
