
720 So.2d 1121 (1998)
Alvin A. HENDERSON, Appellant,
v.
STATE of Florida, Appellee.
No. 97-2899.
District Court of Appeal of Florida, Fourth District.
October 28, 1998.
Richard L. Jorandby, Public Defender, and Marcy K. Allen, Assistant Public Defender, West Palm Beach, for appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Ann M. Phillips, Assistant Attorney General, Daytona Beach, for appellee.
KROLL, KATHLEEN J., Associate Judge.
Alvin A. Henderson appeals the judgment revoking his community control and youthful offender status and his prison sentence. We reverse and remand for resentencing.
In 1993, defendant committed felonies each of which carried a statutory maximum of five years in prison. Case number 93-334 concerned a battery on a school board employee. Case number 93-333 charged defendant with battery, escape from a juvenile detention center, and grand theft. Except for battery, each of these offenses is a third degree felony punishable by a maximum of five years in the department of corrections. See Fla. Stat. §§ 231.06 (1993); 39.112 (1989);[1] 812.014(1993); 775.082(3)(d)(1993).
On September 17, 1993 defendant pled nolo contendere to each charge in both cases. On all counts he was adjudicated guilty. In case number 93-334, defendant was sentenced as a youthful offender to four years in prison followed by one year of community control. In case number 93-333, defendant *1122 was sentenced to time served (79 days) on the battery charge; on the two felony charges, defendant was sentenced as a youthful offender to concurrent terms of four years in prison followed by one year of community control. This sentence was concurrent with the sentence imposed in case number 93-334. Defendant was credited for time served (79 days) in each count in both cases. Taking into account gain time, defendant served the four year incarceration portion of his sentence as of February 2, 1996. Defendant was released from prison on February 2, 1996 and began serving the community control portion of his sentence.

First Violation of Community Control
On June 5, 1996, five months into defendant's one year community control portion of his sentence, an affidavit of violation of community control was filed in both cases alleging possession of marijuana as evidenced by urinalysis. On July 26, 1996, defendant admitted the violation, the trial court revoked community control, and sentenced defendant to eighteen months of community control.
On this appeal, over one year after his eighteen month community control sentence was imposed, defendant contends for the first time that the eighteen month period of community control, in conjunction with his four year prison sentence, constitutes an illegal sentence because it exceeds the five year maximum sentence allowed by statute for the underlying third degree felonies.
We agree with defendant that this sentence exceeds the maximum period set forth by law for the felonies he committed and thus constitutes an illegal sentence. See State v. Mancino, 705 So.2d 1379, 1381 (Fla. 1998). A sentence which exceeds the statutory maximum for the offense may be raised at any time because such error is fundamental. See McDaniel v. State, 704 So.2d 686 (Fla. 1st DCA 1997); § 924.051(3), Fla. Stat. (1997). "Even with a defendant's assent, the court is without jurisdiction to impose a sentence in excess of the statutory maximum." Collins v. State, 697 So.2d 1305, 1307-08 (Fla. 4th DCA 1997).
Here, by the time defendant was charged in the June 5, 1996 affidavit with violating community control, he had already served five months of his one year community control. Thus, the maximum amount of community control to which the trial court could have sentenced defendant was seven months. See Young v. State, 697 So.2d 75 (Fla.1997); § 948.06(3), Fla. Stat. (1997).

Second Violation of Community Control
On October 31, 1996, an affidavit of violation of community control was filed in both cases alleging that defendant's urinalysis again tested positive for marijuana and he was not at his approved place of residence on one occasion. The parties agree that this affidavit was timely filed. On June 3, 1997, an amended affidavit of violation of community control was filed in both cases which included the additional allegations that defendant was arrested for possession of a firearm by a convicted felon, carrying a concealed firearm, and resisting arrest without violence.
Defendant contends that the June 3, 1997 amended affidavit was filed beyond the maximum five year term for which he could legally have been sentenced, so the trial court did not have jurisdiction to consider the charges in the June 3 affidavit when sentencing him for violation of community control. As explained below, we agree and remand to the trial court for a determination of an appropriate sentence based solely upon the timely filed October 31, 1996 affidavit.
On June 19, 1997 defendant admitted the violation of community control in each case. On July 18, 1997 defendant's community control was revoked and he was sentenced as an adult.

Timeliness of the June 3, 1997 Amended Affidavit of Violation of Community Control
Implicit in the analysis of this case is whether defendant waived one year of credit for time served in prison. If so, then the June 3, 1997 affidavit would have been timely filed. Without a waiver, defendant's sentence of eighteen months of community control exceeds the five year statutory maximum when added to the four year prison sentence. For the following reasons, we conclude that defendant did not waive any time served.
*1123 After serving time in prison, defendant was released and subsequently resentenced to eighteen months of community control. At this time, on July 23, 1996, defendant signed a Petition to Enter Plea of Guilty/ Nolo Contendere which contained the following typed paragraph with the words "3 years" handwritten: "The Defendant by agreement has 3 years credit for time served in jail and is waiving all other credit for time already served." There is no evidence from the record that there was an understanding at the plea conference that a year of prison credit was being waived by defendant. This court has previously held that a waiver of jail time credit must be clearly shown on the record and must be specific and voluntary. See Silverstein v. State, 654 So.2d 1040, 1041 (Fla. 4th DCA 1995).
Applying the correct credit for time served, four years, makes the July 26, 1996 sentence of eighteen months exceed the five year maximum for the original offenses. Defendant was released from prison on February 2, 1996 thus, a lawful one year term of community control would have expired on February 1, 1997. The amended affidavit of violation of community control was filed on June 3, 1997three months too late.
Thus, sub judice, the trial court improperly considered the allegations in the untimely filed June 3, 1997 amended affidavit. However, the timely filed October 31, 1996 affidavit alleging a positive urinalysis for marijuana and failure to be at the approved place of residence, was properly considered by the trial court.
In Collins v. State, 697 So.2d 1305 (Fla. 4th DCA 1997), the defendant's probationary term was in excess of the statutory maximum when combined with prior sanctions. However, because the violations of probation occurred while the defendant was still serving the portion of the probationary term within the statutory maximum, this court held that reversal of the order revoking his probation was not required. This court noted that "`[s]entences which exceed the maximum permitted by law are considered void to the extent by which they exceed the statutory maximum.' Therefore, the `sentence is legal so far as it is within the provisions of the statute and only void as to the excess.'" Id. at 1307 (citations omitted). We state now as we have stated before
There is simply no logical reason for preventing a trial court from finding a violation of probation, if the violation occurred during the legal portion of the probation. If defendant had collaterally attacked his sentence after it had been imposed, the sentence would have been void only as to the portion in excess of the statutory maximum.
Id. Our supreme court, in Taylor v. State, 702 So.2d 487, 488 (Fla.1997), agreed with this court's statement in Collins that "A defendant who violates his probation should not be able to escape punishment when the violation occurs during the legal portion of the sentence and the violation is unrelated to that illegality." Collins at 1307.
Sub judice, defendant may successfully challenge his conviction for violations which occurred during the portion of his sentence beyond the five year statutory maximum. However, the October 31, 1996 affidavit alleging that defendant tested positive for marijuana was filed within the five year maximum term of defendant's sentence. While testing positive for marijuana may qualify as a substantive violation, see Robinson v. State, 702 So.2d 1346 (Fla. 5th DCA 1997), it is not clear whether the trial court in this case would have imposed the sentences it did based solely upon the allegations in the October 31, 1996 affidavit.
Reversed and Remanded for resentencing on the October 31, 1996 affidavit of violation of community control.
FARMER and STEVENSON, JJ., concur.
NOTES
[1]  Regarding the offense of an escape from a detention center, in B.H. v. State, 645 So.2d 987, 996 (Fla.1994), our supreme court found section 39.061, Florida Statutes (Supp.1990) unconstitutional and determined that there was an automatic revival of its predecessor statute, section 39.112 (1989).
