Appellant was sentenced according to guidelines in effect at the time of sentencing rather than those in effect at the time of his offense. The state agrees that as interpreted recently by the Supreme Court in Miller v. Florida, 482 U.S. -, 107 S.Ct. 2446, 96 L.Ed.2d 351 (1987) this was in violation of the ex post facto prohibition of the United States Constitution.
Appellant also argues that the court should have given him credit for the time served on the sentence when he was resen-tenced after violation of probation. This court has clearly stated that a defendant is entitled to credit for all time spent in jail prior to sentence on his offense. Ault v. State, 415 So.2d 147 (Fla. 2d DCA 1982). See also Wright v. State, 355 So.2d 870 (Fla. 2d DCA 1978).
Reversed and remanded for resentenc-ing.
DANAHY, C.J., and RYDER, J., concur.