
56 Cal.App.4th 1481 (1997)
In re STACY ALAN WINNER on Habeas Corpus.
Docket No. C025288.
Court of Appeals of California, Third District.
July 8, 1997.
*1483 COUNSEL
Mark E. Cutler and Arnold Erickson, under appointments by the Court of Appeal, for Petitioner.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Robert R. Anderson, Assistant Attorney General, and James Ching, Deputy Attorney General, for Respondent.
OPINION
SCOTLAND, Acting P.J.
Petitioner, Stacy Alan Winner, a prison inmate, seeks a writ of habeas corpus, contending he was unfairly denied the restoration of worktime credits he forfeited when he was disciplined for manufacturing alcohol in prison. According to petitioner, the amended version of California Code of Regulations, title 15, section 3327, subdivision (a)(1), which precludes the restoration of forfeited credits, may not be applied to him without violating the state and federal constitutional prohibition against ex post facto laws. (Further section references are to title 15 of the California Code of Regulations unless otherwise specified.) We disagree and shall deny the petition.
As we shall explain, although the amendment followed the misconduct for which he lost credits, petitioner cannot show its application to him violated the prohibition against ex post facto laws. This is so because petitioner's misconduct occurred after the Legislature eliminated a prisoner's statutory right to restoration of forfeited credits under certain circumstances and, instead, gave to the Director of Corrections (the Director) discretion whether to restore such credits. Once authorized to do so, the Director promulgated *1484 the regulatory amendment that petitioner challenges, thereby exercising his discretion to deny restoration of credits to inmates, like petitioner, whose conduct was severe enough to justify the loss of more than 90 days' credit. Because the Director's action was consistent with the controlling statute as it existed at the time of petitioner's misconduct, petitioner cannot demonstrate that the regulation increased the measure of his punishment.

FACTS
On January 23, 1996, while incarcerated in state prison, petitioner manufactured alcohol, a serious rule violation and division C offense, which resulted in his forfeiture of 120 days of worktime credits. (§§ 3016, 3315, subd. (a)(3)(E), 3323, subd. (e)(11).)
Prior to 1996, former sections 3327, subd. (e) and 3328, subd. (c) provided that, if an inmate in petitioner's position remained free of discipline for six months following his infraction, he was entitled to file a California Department of Corrections (CDC) form 958 and have 50 percent of the forfeited credits restored unless he refused to perform in a work-training or educational assignment during the disciplinary-free period, or unless extraordinary circumstances existed as specified in section 3329.
Sections 3327 and 3328 were promulgated by the Director pursuant to Penal Code section 5058, which authorizes the Director to prescribe and amend rules and regulations for the administration of prisons, and subdivision (c) of Penal Code section 2933, which, prior to 1996, provided in pertinent part: "Under regulations adopted by the Department of Corrections, which shall require a period of not more than one year free of disciplinary infractions, worktime credit which has been previously forfeited may be restored by the director. The regulations shall provide for separate classifications of serious disciplinary infractions as they relate to restoration of credits; the time period required before forfeited credits or a portion thereof may be restored; and the percentage of forfeited credits that may be restored for these time periods.... Upon application of the prisoner and following completion of the required time period free of disciplinary offenses, forfeited credits eligible for restoration under the regulations shall be restored unless, at a hearing, it is found that the prisoner refused to accept or failed to perform in a credit qualifying assignment or extraordinary circumstances are present that require that credits not be restored. `Extraordinary circumstances' shall be defined in the regulations adopted by the director." (Stats. 1994, ch. 90, § 1, italics added.)
Effective January 1, 1996, the Legislature amended subdivision (c) of Penal Code section 2933. The sentence we have italicized above was *1485 changed to provide: "Upon application of the prisoner and following completion of the required time period free of disciplinary offenses, forfeited credits eligible for restoration under the regulations for disciplinary offenses other than serious disciplinary infractions punishable by a credit loss of more than 90 days shall be restored unless, at a hearing, it is found that the prisoner refused to accept or failed to perform in a credit qualifying assignment, or extraordinary circumstances are present that require that credits not be restored." (Stats. 1995, ch. 557, § 2, italics added.)
In addition, the Legislature added a sentence at the end of the first paragraph of Penal Code section 2933, subdivision (c) as follows: "However, in any case in which worktime credit was forfeited for a serious disciplinary infraction punishable by a credit loss of more than 90 days, restoration of credit shall be at the discretion of the director." (Stats. 1995, ch. 557, § 2.)
Thus, as of January 1, 1996, the Director no longer was required to automatically restore credits forfeited for serious disciplinary infractions punishable by a credit loss of more than 90 days, but had discretion to do so. In accordance with amended Penal Code section 2933, subdivision (c), the Director issued new emergency regulations on March 20, 1996, to specify the circumstances under which forfeited credits would be restored. Section 3327 was amended to provide: "(a) Forfeited credits shall at no time be restored as specified below: [¶] (1) No credit shall be restored for any serious disciplinary offense punishable by a credit loss of more than 90 days. These offenses include Divisions A-1, A-2, B and C." In addition, language in section 3328 concerning the restoration of credits forfeited for a division A-1, A-2, B or C offense was deleted.
On April 1, 1996, a Department of Corrections administrative bulletin was issued stating that credit losses of more than 90 days would not be restored and that the new policy applied to inmate infractions occurring prior to April 1, 1996. The bulletin provided: "Inmates will be denied restoration of credits for rule violations where worktime credit losses were greater than 90 days and CDC Form 958, Application for Restoration of Credits, are not submitted 30 days subsequent to the date of this bulletin. Following this 30 day window period, there will no longer be restoration of forfeited credits for Division A-1, A-2, B, and C level offenses."
Petitioner filed an inmate appeal on April 10, 1996, claiming he unfairly was denied the opportunity to complete a six-month disciplinary-free period and obtain restoration of 50 percent of his forfeited credits. The warden of Mule Creek State Prison advised petitioner that he would not be eligible for *1486 restoration of credits within the requisite time frames, i.e., he would not have completed the six-month disciplinary-free period during the thirty-day window period following the date of the administrative bulletin. Accordingly, petitioner was "no longer eligible for restoration of credits. Due to the language of [Penal Code section] 2933, this action is not deemed ex post facto." The Director affirmed the warden's decision.
Following the exhaustion of his administrative remedies, petitioner filed a petition for writ of habeas corpus in the superior court. As pertinent to the issue before us, petitioner claimed the application of the amended regulations violated the state and federal constitutional prohibition against ex post facto laws. The trial court disagreed and denied the petition.

DISCUSSION
(1a) Petitioner contends the amended regulations may not be applied to him without violating the constitutional prohibitions against ex post facto laws. (U.S. Const., art. I, § 10, cl. 1; Cal. Const., art. I, § 9.)
(2) The California Supreme Court has directed that the ex post facto clause of the California Constitution be analyzed identically to that of the United States Constitution. (Tapia v. Superior Court (1991) 53 Cal.3d 282, 295 [279 Cal. Rptr. 592, 807 P.2d 434]; accord, People v. McVickers (1992) 4 Cal.4th 81, 84 [13 Cal. Rptr.2d 850, 840 P.2d 955].) "To fall within the ex post facto prohibition, a law must be retrospective  that is, `it must apply to events occurring before its enactment'  and `it must disadvantage the offender affected by it' ... by altering the definition of criminal conduct or increasing the punishment for the crime." (Lynce v. Mathis (1997) 519 U.S. ___, ___ [117 S.Ct. 891, 896, 137 L.Ed.2d 63, 72], citations omitted.) A party asserting an ex post facto claim has the ultimate burden of establishing that the measure of punishment itself has changed. (California Dept. of Corrections v. Morales (1995) 514 U.S. 499, 510, fn. 6 [115 S.Ct. 1597, 1609, 131 L.Ed.2d 588, 597].)
(1b) According to petitioner, the amended versions of sections 3327 and 3328 operate retrospectively if applied to his prison rules violation because they were amended two months after he was cited for manufacturing alcohol, the offense for which he was punished with a credit forfeiture. Petitioner argues the amended regulations increased his punishment because they deprived him of his entitlement to the restoration of 50 percent of his forfeited credits if he remained disciplinary-free for six months. He analogizes his situation to that in Weaver v. Graham (1981) 450 U.S. 24 [101 S.Ct. 960, 67 L.Ed.2d 17], where the United States Supreme Court held that *1487 the retroactive decrease in the amount of "gain time" awarded for an inmate's good behavior, which served to restrict the inmate's opportunity to shorten his prison time through good conduct, violated the ex post facto clause. (Id., at pp. 35-36 [101 S.Ct. at pp. 967-968, 67 L.Ed.2d at pp. 26-27].)
The flaw in petitioner's argument is that he has overlooked the amendment to Penal Code section 2933, which took effect prior to his misconduct in prison. Following the amendment, prison inmates who committed serious infractions punishable by a credit loss of more than 90 days no longer had an entitlement to the automatic restoration of forfeited credits upon the completion of a disciplinary-free period. Rather, the restoration of credits was not permitted except at the discretion of the Director.
Hence, the versions of sections 3327 and 3328 in existence at the time Penal Code section 2933 was amended became invalid to the extent they conflicted with Penal Code section 2933 by requiring that credits be restored. (In re Reina (1985) 171 Cal. App.3d 638, 644 [217 Cal. Rptr. 535] [regulation is invalid and ineffective unless consistent with statute allowing the agency to adopt regulations to carry out the provisions of the statute].)
Accordingly, at the time of his prison misconduct, petitioner's right to reinstatement of forfeited credits was limited to that provided in Penal Code section 2933, i.e., he was not entitled to restoration of credits except at the discretion of the Director.
Petitioner cannot show that the retrospective application of the subsequently amended regulations violated the prohibition against ex post facto laws because he cannot meet his burden of demonstrating an increase in the measure of punishment. To do so, it is not sufficient to show that the amendment to the regulations creates a speculative possibility of increasing the measure of punishment. (California Dept. of Corrections v. Morales, supra, 514 U.S. at pp. 509-510 [115 S.Ct. at pp. 1603-1604, 131 L.Ed.2d at p. 597]; Johnson v. Gomez (9th Cir.1996) 92 F.3d 964, 967.)
It is speculative that the Director would have exercised his discretion to grant petitioner a restoration of the forfeited credits. To the contrary, once he was authorized to do so by the amendment to Penal Code section 2933, the Director exercised his discretion to amend the regulations to deny all restoration of credits to inmates, like petitioner, who had forfeited more than 90 days of credits for disciplinary violations. This indicates the Director would not have exercised his discretion to grant the restoration of credits to petitioner.
*1488 Because the Director's action was consistent with the controlling statute as it existed at the time of petitioner's misconduct, petitioner cannot demonstrate that application of the amended regulations increased the measure of his punishment.
(3) Petitioner also asserts the application of the amended regulations deprived him of due process in that he did not have fair warning of the consequences of his actions. We disagree.
At the time petitioner violated the prison rules, he was aware this would result in the loss of credits (§ 3323, subd. (e)(11)), and the amended version of Penal Code section 2933 gave him notice that he no longer could expect to have a percentage of the credits he forfeited restored automatically. This was sufficient.

DISPOSITION
The petition is denied.
Raye, J., and Morrison, J., concurred.
A petition for a rehearing was denied August 6, 1997, and petitioner's application for review by the Supreme Court was denied November 19, 1997. Kennard, J., was of the opinion that the application should be granted.
