
27 Ill. App.3d 834 (1975)
327 N.E.2d 314
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
ROBERT M. HOUSTON, Defendant-Appellant.
No. 74-229.
Illinois Appellate Court  Second District (1st Division).
April 28, 1975.
*835 Ralph Ruebner, of State Appellate Defender's Office, of Elgin, for appellant.
William E. Sisler, State's Attorney, of Freeport (James W. Jerz and Edward N. Morris, both of Illinois State's Attorneys Association, of counsel), for the People.
Sentence vacated and cause remanded.
Mr. JUSTICE HALLETT delivered the opinion of the court:
Following a hearing on a petition to revoke the defendant's probation, a sentence of 1 to 3 years' imprisonment was imposed upon the defendant, Robert M. Houston. The court ordered this sentence credited only with the time the defendant had spent in jail during periodic imprisonment and during the pendency of the hearing on this petition to revoke his probation. On appeal, the State concedes that the defendant is entitled to have his term of imprisonment credited with the time the defendant had served on probation, pursuant to section 5-6-4(h) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(h)) as it existed prior to its amendment by Public Act 78-939. The sole issue presented for our consideration is what constitutes "time served on probation." We agree with the State that the defendant's sentence should not be credited with the entire interval from the initial imposition of probation upon the defendant to the revocation of his probation. Rather, the defendant's sentence should be credited only with time served on probation prior to the issuance of bench warrants based on petitions charging violation of his probation, in accordance with section 5-6-4(a) of the Unified Code of Corrections (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(a)).
On November 16, 1972, the defendant entered a plea of guilty to the offense of forgery and was placed on probation for a 2-year period. A petition to revoke the defendant's probation, alleging that the defendant had failed to report to his probation officer and was unlocatable, was filed by the State on May 29, 1973. Pursuant to this petition to revoke probation, the court issued a bench warrant. From the record, it appears that the defendant was not arrested pursuant to this warrant until November 9, 1973. On November 13, 1973, the State filed a supplemental petition to revoke the defendant's probation alleging that the defendant had further violated the terms of his probation by committing the offense of *836 forgery on December 28, 1972. At the hearing on November 16, 1973, the defendant denied the allegations of the petitions, and the hearing was continued to December 21, 1973. During the interval between November 9, 1973, and December 21, 1973, the defendant, unable to post bail, was incarcerated in the Stephenson County jail.
When the hearing on the petition for the revocation of probation resumed on December 21, 1973, the defendant admitted the previously denied allegations. At the conclusion of the hearing, the court ordered that the defendant's probationary period continue for 1 year. In addition, the court ordered that he serve a term of periodic imprisonment in the Stephenson County jail for the first 6 months of the probation, with credit for the time served pending this hearing. The order provided that the defendant was to be released each Wednesday for the purpose of seeking employment and that he was to be released between 8 A.M. and 8 P.M. on Christmas Day, 1973.
Pursuant to this order, the defendant was released from custody on Christmas Day, but failed to return to the jail at the appropriate hour. The State filed another petition to revoke the defendant's probation, and a bench warrant was issued on December 26, 1973. On the following day, the defendant with appointed counsel appeared in court, and the hearing on this petition for the revocation of probation was continued to January 4, 1974.
On January 3, 1974, the State filed yet another petition, alleging that the defendant had been released from the jail on Wednesday, January 2, 1974, pursuant to the order of periodic imprisonment and had failed to report back to the Stephenson County jail. A bench warrant for the defendant's arrest was issued. The defendant was arrested in Bettendorf, Iowa, on February 19, 1974, and thereafter was returned to the Stephenson County jail. On March 18, 1974, at the conclusion of the hearing on these petitions, the court revoked the defendant's probation and periodic imprisonment for the original forgery conviction. The court further ordered that this sentence was to be credited "only for those days served in confinement pursuant to the order for periodic imprisonment dated December 21, 1973, and those days served in confinement pending the hearing on the petition to revoke his probation."
On appeal, the defendant contends that under the provisions of the Unified Code of Corrections effective when this sentence was imposed, he was entitled to have his term of imprisonment credited with the time he had served on probation. According to the defendant, the 1- to 3-year sentence must be credited with the interval between November 16, 1972, when he was initially granted probation, and March 18, 1974, when his probation was ultimately revoked. The State concedes that the defendant *837 is entitled to be credited with an additional amount of time than that which is reflected in the court's order. However, the State, in essence, asserts that this credit should exclude the time during which there were outstanding bench warrants.
In determining the amount of time that should be credited to the defendant's sentence, we note as a preliminary consideration that section 5-6-4(h) (Ill. Rev. Stat. ch. 38, par. 1005-6-4(h)) as originally enacted has been amended by Public Act 78-939. The statute as originally enacted provided
"* * * Time served on probation or conditional discharge shall be credited against a sentence of imprisonment or periodic imprisonment." (Ill. Rev. Stat. 1972 Supp., ch. 38, par. 1005-6-4 (h).) (Emphasis added.)
However, Public Act 78-939 amended this mandatory crediting procedure by permitting judicial discretion in the matter.
"* * * Time served on probation or conditional discharge shall be credited by the court against a sentence of imprisonment or periodic imprisonment unless the court orders otherwise." (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(h).) (Emphasis added.)
Had Public Act 78-939 been effective on the date the defendant's probation was revoked and sentence was imposed, the order of the court would preclude the defendant from any additional credit for time served on probation. However, it has been held that the effective date of Public Act 78-939 is July 1, 1974. (People v. Zayas (1974), 17 Ill. App.3d 390, 308 N.E.2d 147 (abstract opinion); People v. Braddock (1974), 17 Ill. App.3d 73, 308 N.E.2d 74 (abstract opinion); People v. Scott (1974), 20 Ill. App.3d 880, 887, 314 N.E.2d 671; People v. Robinson (1974), 20 Ill. App.3d 152, 156, 313 N.E.2d 213; People v. Taylor (1974), 21 Ill. App.3d 702, 704, 315 N.E.2d 914; People ex rel. Klinger v. Howlett (1972), 50 Ill.2d 242, 278 N.E.2d 84.) Consequently, the provision as originally enacted was effective on March 18, 1974, the date the defendant's probation was revoked and sentence was imposed, and its mandatory provisions control the case at bar.
As the State concedes in the case at bar, the defendant is entitled to have the time successfully served on probation credited to his prison sentence. People v. Decker (1973), 15 Ill. App.3d 230, 304 N.E.2d 99; People v. Blake (1973), 15 Ill. App.3d 39, 44, 303 N.E.2d 419; People v. Lutz (1974), 17 Ill. App.3d 1001, 1004, 309 N.E.2d 98; People v. Bullion (1974), 21 Ill. App.3d 297, 300, 314 N.E.2d 731; People v. Godsey (1974), 22 Ill. App.3d 382, 387, 317 N.E.2d 157; People v. Fleming (1974), 23 Ill. App.3d 221, 224-225, 318 N.E.2d 518.
Thus, the sole issue is what constitutes "time served on probation" for *838 the purpose of crediting the defendant's sentence. Section 5-6-4(a) (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(a)) provides:
"(a) When a petition is filed charging a violation of a condition, the court may:
(1) order a summons to the offender to appear; or
(2) order a warrant for the offender's arrest where there is danger of his fleeing the jurisdiction or causing serious harm to others * * *.

The issuance of such warrant or summons shall toll the sentence of probation or of conditional discharge until the final determination of the charge, and the term of probation or conditional discharge shall not run so long as the offender has not answered the summons or warrant." (Emphasis added.)
This provision must be read in conjunction with section 5-6-4(h) (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(h)) as originally enacted. Thus, we cannot agree with the defendant's position that he should be credited with the entire period from November 16, 1972, to March 18, 1974. Rather, the issuance of the bench warrants pursuant to the filing of the petitions for revocation of probation tolled the sentence of probation, and the term of probation was suspended pending the answering of the warrants. Consequently, we hold that in crediting the defendant's prison sentence with the "time served on probation," the intervals during which the term of probation was suspended by virtue of section 5-6-4(a) (Ill. Rev. Stat. 1973, ch. 38, par. 1005-6-4(a)) must be excluded.
We therefore vacate the sentence and remand the case to the circuit court with directions to credit the defendant with the time successfully served on probation in accordance with this opinion.
Sentence vacated and case remanded with directions.
SEIDENFELD, P.J., and GUILD, J., concur.
