
82 Ill. App.3d 344 (1980)
402 N.E.2d 844
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
RICHARD LEON, Defendant-Appellant.
No. 78-1773.
Illinois Appellate Court  First District (5th Division).
Opinion filed March 21, 1980.
Rehearing denied April 18, 1980.
Charles I. Schwartz, of Chicago, for appellant.
Bernard Carey, State's Attorney, of Chicago (Marcia B. Orr, Iris E. Sholder, and Mark S. Komessar, Assistant State's Attorneys, of counsel), for the People.
Judgment affirmed, sentence vacated and cause remanded.
Mr. JUSTICE MEJDA delivered the opinion of the court:
Defendant was found guilty of public indecency in a jury trial. (Ill. Rev. Stat. 1977, ch. 38, par. 11-9.) He was sentenced to 364 days to the Cook County Department of Corrections and fined $1000 together with court costs of $47. Defendant appeals.
The issues presented are: (1) whether defendant was properly sentenced; (2) whether he should be credited with time served on an unrelated offense although his bond on this appeal remained in full force and effect; and (3) whether this court should reduce the sentence imposed to time considered served and discharge the defendant from further imprisonment. We vacate the instant sentence and remand with directions.
*345 The facts are not in dispute. The evidence at trial indicated that defendant on May 17, 1977, was in a girls' locker room of a high school and exposed his genitals to several female students then present. After a four-day trial the jury returned a guilty verdict at about 5:15 p.m. The court then entered judgment on the verdict and informed counsel that a hearing in aggravation and mitigation would proceed immediately. Defense counsel responded by requesting another date for the hearing as well as for a motion for new trial. The request was denied. Defense counsel then stated: "Judge, I am indicating to you now, Judge, I am not prepared to present any evidence in mitigation."
The trial court then proceeded with the hearing in aggravation and mitigation over defendant's objection. After hearing matters in aggravation, the court inquired: "Any showing in mitigation?" Defense counsel again indicated that he was unprepared at such late hour, only minutes after the return of the verdict, and therefore would have to stand mute. The court then addressed defendant personally and permitted him to make a statement. Sentence was immediately imposed and mittimus ordered to issue.
Defendant appealed and was released on this conviction after posting an appeal bond on November 14, 1978. He was taken into custody in Du Page County on December 11, 1978, pursuant to convictions entered there on unrelated charges. Defendant surrendered in exoneration of his bond in this appeal on July 16, 1979. In his reply brief, defendant states that, because of an incomplete mittimus issued in this case, he was discharged from the Department of Corrections upon completing the Du Page County sentences on August 13, 1979.
 1 Initially, defendant concedes that he was properly convicted and that the conviction should be affirmed. Defendant then contends that the sentence imposed should be vacated or reduced by this court because the trial judge abused his discretion in not allowing the defendant adequate time to prepare for the sentencing hearing. It is well established that a defendant is entitled to a reasonable time to prepare for a sentencing hearing. (People v. La Rocco (1970), 123 Ill. App.2d 123, 260 N.E.2d 52; People v. Williams (1973), 16 Ill. App.3d 146, 305 N.E.2d 333; People v. Hanna (1977), 48 Ill. App.3d 6, 362 N.E.2d 424, cert. denied (1978), 435 U.S. 997, 56 L.Ed.2d 87, 98 S.Ct. 1651. The People agree that defendant should have been allowed adequate time to prepare his argument in mitigation and suggest that the instant case be remanded for resentencing after affording defendant an opportunity to prepare and present arguments in mitigation pursuant to sections 5-4-1(a)(3) and 5-5-3.1 of the Unified Code of Corrections (Ill. Rev. Stat., 1978 Supp., ch. 38, pars. 1005-4-1(a)(3) and 1005-5-3.1). We concur.
Defendant additionally contends that he should be given credit for *346 time served since December 11, 1978, in addition to the time served before his appeal bond was posted on November 14, 1978. The People argue that while defendant began serving his Du Page County sentence on December 11, 1978, he was not in fact serving any time in the instant offense because that sentence was stayed by reason of his appeal bond which remained in full force and effect until July 16, 1979, when defendant was granted leave to surrender in exoneration of his appeal bond. They maintain that this sentence began to run concurrently with the Du Page County sentence as of that last date and therefore only the time served subsequent of July 16, 1979, should be credited to this sentence as being served concurrently with the Du Page County sentence.
Section 5-8-7(b) of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1005-8-7(b)) and the Council Commentary (Ill. Ann. Stat. ch. 38, par. 1005-8-7, Council Commentary, at 514 (Smith-Hurd 1973)) contemplate credit for time served in custody, whether in Illinois or in any other State, as a result of the offense for which the sentence is imposed. (People v. Roberts (1977), 47 Ill. App.3d 524, 528, 362 N.E.2d 106, 109.) In Roberts, the court held that the defendant was not "in custody" under section 5-8-7(b) and was therefore not entitled to credit for time served on a pending Illinois detainer while he was incarcerated in another State for a wholly unrelated crime committed there. The provision for credit against imprisonment for the time spent in custody also does not include the time during which defendant was released on bail. (People ex rel. Morrison v. Sieflaff (1974), 58 Ill.2d 91, 316 N.E.2d 769.) Bail is defined as the security necessary to release a person from "custody." The terms "custody" and "bail" are not used synonymously. 58 Ill.2d 91, 94, 316 N.E.2d 769, 770.
 2 Upon posting his appeal bond, defendant was released on bail and was not in custody as a result of the instant conviction. He was confined and in custody during the period from December 11, 1978, until his surrender in exoneration of the appeal bond on July 16, 1979, solely as a result of the Du Page County convictions. Consequently, defendant is here entitled to credit only for the time in custody after the latter date. However, this is in addition to further credit, if any, for time in custody, both awaiting trial and upon conviction of the instant offense, prior to posting of the appeal bond.
Defendant also urges that this court reduce the sentence imposed to time served and thereby discharge defendant from further imprisonment. While we do have authority to reduce the sentence under Supreme Court Rule 615(b)(4) (Ill. Rev. Stat. 1977, ch. 110A, par. 615(b)(4)), we are reluctant to so modify the sentence in the absence of an adequate hearing in aggravation and mitigation.
 3 The sentencing function can neither be intelligently exercised nor *347 reviewed in the absence of relevant evidence or facts which may be adduced at such hearing. (People v. Tompkins (1969), 112 Ill. App.2d 251, 253, 251 N.E.2d 75, 76.) Upon a full hearing in aggravation and mitigation, as provided by section 5-4-1 of the Unified Code of Corrections (Ill. Rev. Stat., 1978 Supp., ch. 38, par. 1005-4-1), the trial court will be in a superior position to make an appropriate disposition. The trial court is then the proper forum to determine the appropriate sentence to be imposed and the exact credit to which defendant is entitled. We do not intend nor express any opinion as to the ultimate disposition to be made.
For the reasons stated, the judgment of conviction herein is affirmed and the sentence imposed is vacated and the cause remanded to the trial court for resentencing consistent with the views expressed.
Judgment of conviction affirmed; sentence vacated and cause remanded.
SULLIVAN, P.J., and WILSON, J., concur.
