
196 Cal.App.3d 1157 (1987)
242 Cal. Rptr. 421
THE PEOPLE, Plaintiff and Appellant,
v.
TED WILLIAMS, Defendant and Respondent.
Docket No. A036820.
Court of Appeals of California, First District, Division Four.
December 9, 1987.
*1158 COUNSEL
John J. Meehan, District Attorney, Thomas J. Orloff and William M. Baldwin, Assistant District Attorneys, and Theresa Canepa, Deputy District Attorney, for Plaintiff and Appellant.
James R. Jenner, Public Defender, and Clif Taylor, Assistant Public Defender, for Defendant and Respondent.
*1159 OPINION
POCHE, J.
The sole issue in this appeal by the People is whether Assembly Bill No. 2049, which amends Penal Code sections 667 and 1385[1] to nullify the California Supreme Court's decision in People v. Fritz (1985) 40 Cal.3d 227 [219 Cal. Rptr. 460, 707 P.2d 833], applies to crimes committed before its effective date of May 6, 1986. We hold it does not.

THE PROCEEDINGS BELOW
Prior to the commencement of trial, defendant pleaded guilty to committing attempted murder (§§ 187, 664) on March 24, 1986, with enhancements for use of a deadly weapon (§ 12022, subd. (b)) and infliction of great bodily injury upon the victim (§§ 12022.7, 1203.075). Defendant also admitted allegations that on March 28, 1977, he committed two prior serious felonies (residential burglary and robbery) within the meaning of section 667. Utilizing its power under former section 1385,[2] the trial court struck the prior conviction allegations and sentenced defendant to state prison for the aggregate term of five years. This timely appeal by the People followed.

REVIEW
Both the United States and the California Constitutions prohibit criminal or penal laws that are ex post facto. (U.S. Const., art. I, § 10, cl. 1; Cal. Const., art. I, § 9.) (1a) The United States Supreme Court has defined an ex post facto law as one that (a) is retrospective in that it applies to events occurring before its enactment and (b) disadvantages the defendant affected by it. (Weaver v. Graham (1981) 450 U.S. 24, 29 [67 L.Ed.2d 17, 23, 101 S.Ct. 960], citing Lindsey v. Washington (1937) 301 U.S. 397, 401 [81 L.Ed. 1182, 1185-1186, 57 S.Ct. 797] and Calder v. Bull (1798) 3 Dall. 386, 390; accord Miller v. Florida (1987) 482 U.S. 423, 429-431 [96 L.Ed.2d 351, 359-360, 107 S.Ct. 2446, 2451].)
(2a) Defendant committed the charged crime on or about March 24, 1986; the new provisions  sections 1385 and 667  did not become effective until May 6, 1986. Hence, application to defendant would be retrospective.
*1160 The only remaining consideration is whether such an application would work to defendant's disadvantage.
(1b) The California Supreme Court has found, in accordance with the United States Supreme Court's holding in Weaver, that the critical determinant is whether "the system itself ha[s] been altered to the prisoner's detriment." (In re Ramirez (1985) 39 Cal.3d 931, 936 [218 Cal. Rptr. 324, 705 P.2d 897], cert. den., 476 U.S. 1152 [90 L.Ed.2d 711, 106 S.Ct. 2266]; accord Weaver v. Graham, supra, 450 U.S. at p. 33, [67 L.Ed.2d at p. 25]; In re Stanworth (1982) 33 Cal.3d 176, 186 [187 Cal. Rptr. 783, 654 P.2d 1311].) This occurs, the United States Supreme Court tells us, "even if a statute merely alters penal provisions accorded by the grace of the legislature, ..." (Weaver v. Graham, supra, at p. 30 [67 L.Ed.2d at p. 24].) Thus, once the legislature has statutorily afforded a benefit, that benefit may only be taken away prospectively. The presence or absence of a vested right is irrelevant. (Ibid.)
(2b) When defendant committed his present crime, trial courts had discretionary power under former section 1385 to strike prior felony convictions charged as serious felonies per section 667 by virtue of the California Supreme Court's ruling in People v. Fritz, supra, 40 Cal.3d 227, 231. The amended version of section 1385 removes from the trial court all discretion to strike the prior felony convictions, thus rendering imposition of a five-year enhancement for each such prior conviction a certainty. Plainly, the system by which defendant's sentence is to be calculated has been changed to his detriment.
It is irrelevant to an ex post facto determination that a defendant could have received the same sentence under the old law as he definitely will under the new law. (Lindsey v. Washington, supra, 301 U.S. at pp. 400-401 [81 L.Ed. at p. 1185]; accord Miller v. Florida, supra, 482 U.S. at pp. 432-433, [96 L.Ed.2d at pp. 361-362, 107 S.Ct. 2452].) It is therefore irrelevant here that defendant could have received a five-year enhancement under the old law. By making mandatory what was previously discretionary, the Legislature has changed the standard by which punishment will be imposed to defendant's disadvantage. Applying these laws to defendant thus runs afoul of the ex post facto clause.
(3) Although procedural changes generally are considered outside the reach of the ex post facto clause (cf. Weaver v. Graham, supra, 450 U.S. at p. 29, fn. 12 [67 L.Ed.2d at p. 23], citing Dobbert v. Florida (1977) 432 U.S. 282, 293 [53 L.Ed.2d 344, 356, 96 S.Ct. 2290]; In re Jackson (1985) 39 Cal.3d 464, 471 [216 Cal. Rptr. 760, 703 P.2d 100]), that "`in itself is not the true test.'" (People v. Smith (1983) 34 Cal.3d 251, 260 [196 Cal. Rptr. 692, 667 P.2d 149], quoting People v. Ward (1958) 50 Cal.2d 702, 707 [328 P.2d *1161 777, 76 A.L.R.2d 911], disapproved on other grounds in People v. Morse (1964) 60 Cal.2d 631, 637, fn. 2, 649 [36 Cal. Rptr. 201, 388 P.2d 33, 12 A.L.R.3d 810].) Both the United States and the California Supreme Courts have added several caveats to the general rule of procedural exemption. Thus the United States Supreme Court has stated that "Alteration of a substantial right, however, is not merely procedural, even if the statute takes a seemingly procedural form." (Weaver v. Graham, supra, at p. 29, fn. 12 [67 L.Ed.2d at p. 23], citing Thompson v. Utah (1898) 170 U.S. 343, 354-355 [42 L.Ed. 1061, 1068, 18 S.Ct. 620]; accord Miller v. Florida, supra, 482 U.S. at pp. 432-435, [96 L.Ed.2d at pp. 361-363, 107 S.Ct. at pp. 2452-2453].) This is true because, "`it is the effect, not the form, of the law that determines whether it is ex post facto.'" (People v. Smith, supra, 34 Cal.3d at p. 260, italics in original, quoting Weaver v. Graham, supra, at p. 31 [67 L.Ed.2d at p. 24].)
(2c) In defendant's case, application of the amended versions of sections 1385 and 667 would add two consecutive five-year terms to his sentence. Unmistakably this application would "`substantially alter [] the consequences attached to a crime already completed.'" (In re Ramirez, supra, 39 Cal.3d at p. 936, quoting Weaver v. Graham, supra, at p. 33 [67 L.Ed.2d at p. 25].)
For these reasons we conclude that application of the amended versions of sections 1385 and 667 to defendant who committed his crime before the effective date of the statutes would violate the ex post facto clause.[3] The trial court properly applied the former law to him.
The judgment is affirmed.
Anderson, P.J., and Channell, J., concurred.
On January 8, 1988, the opinion was modified to read as printed above.
NOTES
[1]  All further statutory references are to the Penal Code.

As amended, subdivision (b) of section 1385 provides: "This section does not authorize a judge to strike any prior conviction of a serious felony for purposes of enhancement of a sentence under Section 667." (Amended by Stats. 1986, ch. 85, § 2.)
As amended, subdivision (a) of section 667 provides in relevant part: "In compliance with subdivision (b) of Section 1385, any person convicted of a serious felony who previously has been convicted of a serious felony in this state ... shall receive, in addition to the sentence imposed by the court for the present offense, a five-year enhancement for each such prior conviction on charges brought and tried separately." (Amended by Stats. 1986, ch. 85, § 1.5.)
[2]  Former section 1385 provided in relevant part: "The judge or magistrate may, ... in furtherance of justice, order an action to be dismissed."
[3]  In People v. Hoze (1987) 195 Cal. App.3d 949 [241 Cal. Rptr. 14] [petn. for review pending, Crim. No. S03292] the Third District reached the same conclusion, although there the Attorney General had conceded the issue. (Id. at pp. 955-956.) The Attorney General is not participating on this appeal, so that concession does bind the People here.
