
140 Ill. App.3d 268 (1986)
488 N.E.2d 614
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
JIMMY L. LEGGANS, Defendant-Appellant.
No. 5-84-0827.
Illinois Appellate Court  Fifth District.
Opinion filed January 8, 1986.
*269 Randy E. Blue and Patricia M. Sarter, both of State Appellate Defender's Office, of Mt. Vernon, for appellant.
*270 Gerald Sims, State's Attorney, of Pinckneyville (Kenneth R. Boyle, Stephen E. Norris, and Vito A. Mastrangelo, all of State's Attorneys Appellate Service Commission, of counsel), for the People.
Judgment affirmed and cause remanded.
JUSTICE JONES delivered the opinion of the court:
The defendant, Jimmy L. Leggans, pleaded guilty to aggravated battery and was sentenced to two years' probation. The State subsequently filed a petition to revoke probation, and, after a hearing, probation was revoked. Defendant was sentenced to four years' imprisonment and ordered to pay a fine of $300. The judgment reflects that defendant was to be given credit for 10 days served in the county jail. The court specifically denied credit for time served on probation. On appeal defendant contends (1) that the cause should be remanded to the circuit court for the calculation of sentencing credit due and for the issuance of an amended mittimus reflecting such credit, and (2) that the imposition of a fine was erroneous because the record did not support a determination that the defendant had the ability to pay it.
 1 The object of mandatory credit under section 5-8-7(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1983, ch. 38, par. 1005-8-7(b)) is to account for all time served in confinement for a particular offense. (People v. Scheib (1979), 76 Ill.2d 244, 390 N.E.2d 872.) Defendant was arrested on the aggravated battery charge on March 3, 1984. On March 5, 1984, he pleaded guilty to aggravated battery and was sentenced to two years' probation. As an incident of that probation he was to serve ten days in the county jail. On March 9, 1984, he was taken to the Department of Corrections (D.O.C.) as a parole violator on a prior burglary conviction and released on July 23, 1984. On August 31, 1984, the State filed a petition to revoke probation. The arrest warrant that was issued on the petition was served on August 31, 1984, and defendant posted bond on the same day. On September 24, 1984, an amended petition to revoke probation was filed, and the court increased the bond. Defendant remained in custody until he was sentenced on November 21, 1984. He was taken by the sheriff to the Department of Corrections on November 26, 1984.
 2 Section 5-8-7(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1983, ch. 38, par. 1005-8-7(b)) requires that whenever a sentence of imprisonment is imposed, credit must be given for all time spent in custody. (People v. Scheib (1979), 76 Ill.2d 244, 390 N.E.2d 872.) Accordingly, defendant must be credited with seven days served from the date of arrest, March 3, 1984, to and including March 9, 1984, the date on which he was taken to the Department of Corrections on the parole violation. While a prisoner cannot receive double *271 credit for county jail time and D.O.C. time for an incarceration on the same day for the same offense, defendant was incarcerated on March 9, 1984, in two separate facilities for two different offenses. Since defendant was held in the county jail for part of the day on March 9, 1984, on the aggravated battery conviction in the case at bar, he is entitled to credit for that day despite the fact that he would receive one day's credit for time served in the D.O.C. as a parole violator. (People v. Johns (1984), 130 Ill. App.3d 548, 474 N.E.2d 739.) Defendant is also to be credited for the one day he served on August 31, 1984, on the arrest warrant that was issued pursuant to the petition to revoke probation.
The State argues that defendant should receive credit from August 31, 1984, through September 4, 1984, the day the "Bail Bond Appearance of Defendant with Deposit of Cash Bail Security" was filed in the circuit court. The bail bond, however, states that it was executed on August 31, 1984. Defendant is lastly entitled to 63 days' credit for time spent incarcerated from September 24, 1984, to and including November 25, 1984, dates he was incarcerated following the increase in the amount of his bond.
 3 Defendant contends that he should also receive credit for September 22, the date of his arrest, and September 23. However, he was arrested on a battery charge that was an allegation in the amended petition to revoke probation. The initial arrest on the battery charge was unrelated to the aggravated battery proceeding that is the subject of this appeal, and defendant should not receive credit on the offense upon his conviction in the case at bar for September 22 and 23. People v. Kane (1985), 136 Ill. App.3d 1030, 484 N.E.2d 296.
 4 It was not until September 24, 1984, that the amended petition to revoke probation was filed and defendant's bond on that petition increased to $8,000. Since defendant was transported to the D.O.C. from the county jail for the same offense on November 26, 1984, he should not receive double credit for that day because D.O.C. presumably credited defendant for that day.
For the foregoing reasons this cause is remanded to the circuit court of Perry County with directions to issue an amended judgment and mittimus granting defendant 71 days' credit for time incarcerated against his penal sentence of four years' imprisonment.
 5 Defendant lastly contends that imposition of a fine of $300 was erroneous where the record did not support a determination that the defendant had the ability to pay it. With regard to the issue of the statutory credit of $5 per day for time spent in custody while awaiting sentencing, the State argues that sentencing upon revocation of *272 probation is not sentencing upon a conviction as contemplated by section 110-14 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1983, ch. 38, par. 110-14). This court cannot accept the State's argument. Section 5-6-4(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1983, ch. 38, par. 1005-6-4(b)) provides, in part:
"The court shall admit the offender to bail pending the hearing unless the alleged violation is itself a criminal offense in which case the offender shall be admitted to bail on such terms as are provided in the Code of Criminal Procedure of 1963, as amended."
By this language the legislature has expressed its intention that individuals incarcerated as a result of revocation of probation be treated on the same basis as those incarcerated as a result of a criminal charge. Although the offense for which probation is sought to be revoked might be the subject of criminal charges, if no criminal charges are filed the statutory scheme for allowing defendants credit against their fines for time spent incarcerated prior to posting bond on the probation revocation warrant is not altered. We hold that incarceration upon probation revocation proceedings is within the purview of section 110-14.
 6 Defendant is entitled to $5 credit against his fine for the time spent incarcerated for failing to post bond on March 3, 1984, since he spent a part of that date incarcerated for failing to post bond prior to pleading guilty (see People v. Johns (1984), 130 Ill. App.3d 548, 474 N.E.2d 739). He is not entitled to such credit for March 4, 1984, through March 9, 1984, because those days were served as an incident of probation rather than incarceration on a bailable offense within the purview of section 110-14. For reasons already stated defendant is entitled to $5 credit for August 31, 1984, the day he was arrested on the probation violation warrant. Defendant is also entitled to $5 credit for each day from September 24, 1984, to and including November 21, 1984, the day of sentencing, or 59 days, which was time he was incarcerated because he could not post the increased bond. Defendant is not entitled to $5 credit from November 22, 1984, through November 25, 1984, because he was not incarcerated on a bailable offense.
For the foregoing reasons, this cause is remanded to the circuit court of Perry County for credit upon defendant's fine of $5 per day for 61 days' incarceration for failure to post bond.
Affirmed and remanded with directions.
KASSERMAN, P.J., and KARNS, J., concur.
