
161 Ill. App.3d 938 (1987)
515 N.E.2d 1042
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
WILLIAM DEAN PLANER, Defendant-Appellant.
No. 4-87-0216.
Illinois Appellate Court  Fourth District.
Opinion filed October 15, 1987.
Modified on denial of rehearing November 18, 1987.
*939 Daniel D. Yuhas and Lawrence J. Essig, both of State Appellate Defender's Office, of Springfield, for appellant.
Charles H. Burch, State's Attorney, of Hardin (Kenneth R. Boyle, Robert J. Biderman, and Linda Cullom, all of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Order affirmed and cause remanded.
JUSTICE McCULLOUGH delivered the opinion of the court:
The defendant, William D. Planer, was convicted of burglary and theft, and subsequently sentenced to 30 months' probation. On December 30, 1986, the State filed a petition to revoke probation alleging the defendant had been cited for driving while license revoked. Ill. Rev. Stat. 1985, ch. 95 1/2, par. 6-303.
Following a hearing on the matter, the defendant's probation was ordered revoked and defendant was thereafter sentenced to the Department of Corrections for a term of four years.
The defendant appeals the order of the court and in support thereof argues: (1) the trial court erred by not accepting the defendant's theory of necessity; (2) the State misrepresented the law during closing argument; (3) he was denied effective assistance of counsel; and (4) the judgment and mittimus do not accurately reflect the proper amount of credit due for time served.
We affirm and remand for modification of the judgment with respect to the sentence imposed.
On December 17, 1985, the defendant was convicted of burglary and theft, and was subsequently sentenced to probation. On December *940 12, 1986, the defendant was cited for driving while license revoked. (Ill. Rev. Stat. 1985, ch. 95 1/2, par. 6-303.) As a result, on December 30, 1986, the State filed a petition to revoke the defendant's probation. Following a hearing, the defendant's probation was revoked.
At the probation revocation proceedings, Mike Margherio, chief of police of Hardin, Illinois, testified that on December 19, 1985, he witnessed defendant driving a red pickup truck. Margherio knew the defendant, and was aware of the fact that his driving privileges had been suspended. As a result, Margherio stopped the truck, issued defendant a citation, and transported the defendant to the Calhoun County sheriff's office. The defense does not dispute that defendant was driving.
Margherio noted there were two passengers in the truck, a woman, Letha Klaas, who was seated in the middle, and a man later identified as Bob Harman. When asked why he was driving, the defendant asked Margherio to "give him a break because he couldn't afford a ticket." Defendant made no mention of any problem or medical emergency.
The State introduced into evidence a certified copy of the defendant's driving record which indicated defendant's license was revoked on December 19, 1985.
The defendant presented Bob Harman, a passenger in the truck, who stated that he was at defendant's residence on December 19, 1985. At approximately 2 p.m., Letha Klaas, defendant's pregnant fiancee, began experiencing stomach pains and indicated that she was going to the doctor in Jerseyville. Harman testified that he accompanied the defendant and Klaas. Harman, who is 17 years old and not a licensed driver, stated that Klaas initially drove the pickup truck. Shortly after they departed, Klaas realized she had forgotten her medical card, so she turned around and began to drive home. At this point, however, Klaas asked the defendant to drive as the pain had increased.
Letha Klaas, defendant's fiancee, corroborated the testimony of Harman, indicating that while en route to the doctor's office she experienced a great deal of pain and asked the defendant to drive. Klaas stated that she initially was driving and only asked the defendant to drive when the pain increased, causing her to double over. Klaas admitted that after the defendant was stopped and taken into custody, she went to the sheriff's office to attempt to post bond for the defendant and did not seek any medical treatment on December 19, 1985. Klaas indicated that the pain subsided.
Based upon this evidence, the defense argued that the defendant *941 was justified in driving due to the medical emergency presented. The court found the defendant guilty of having violated a condition of probation and set the cause for sentencing.
At the sentencing hearing, the court imposed a four-year period of imprisonment. The court gave the defendant credit for all time on probation and for pretrial detention.
The defendant initially maintains that the trial court erroneously rejected the defendant's evidence because it did not believe Illinois recognized the necessity defense. The defendant bases his argument upon the following conversation which occurred after closing argument:
"THE COURT: Is there such a thing as justification for crime?
[Defense Counsel]: Your Honor, I looked through the traffic on the driving  justification for driving. I couldn't find anything.
THE COURT: I asked you a question.
[Defense Counsel]: I couldn't find anything, Your Honor.
THE COURT: Well, [defense counsel], if there is such a thing in 40 some years of practice of law, I never found it; and I'd be willing to listen to you, if you have it but you don't have. Then I proceed as we started out to. There isn't any question that by the preponderance of the evidence, Dean Planer has been found guilty of having violated the condition of his probation. No matter what the emergency was. It's still there."
Based upon this alleged "misapprehension of law" the defendant demands a new hearing. The State, however, asserts that the trial court was not misinformed with respect to the law of necessity, but merely unpersuaded by the evidence presented.
 1 Necessity is an affirmative defense and, thus, a defendant seeking to raise it must present "some evidence" in support thereof. (People v. Parker (1983), 113 Ill. App.3d 321, 447 N.E.2d 457; People v. Perez (1981), 97 Ill. App.3d 278, 422 N.E.2d 945.) To succeed on a claim of necessity, defendant must show: (1) he was without blame in occasioning or developing the situation; and (2) he reasonably believed his conduct was necessary to avoid a public or private injury greater than the injury which might reasonably result from his conduct. (People v. Perez (1981), 97 Ill. App.3d 278, 422 N.E.2d 945, citing Ill. Rev. Stat. 1977, ch. 38, par. 7-13.) Necessity is viewed as involving a choice between two evils where no other optional course of conduct is available. (People v. Krizka (1980), 92 Ill. App.3d 288, 416 N.E.2d 36.) Necessity, in this respect, is the assertion that the conduct involved *942 "promotes some higher value than the value of literal compliance with the law." Arnolds & Garland, The Defense of Necessity in Criminal Law: The Right to Choose the Lesser Evil, 65 J. Crim. L. & Criminology 289 (1974).
 2 The defendant herein presented testimony from two passengers of the truck who claimed it was necessary for the defendant to drive based upon the medical condition of Letha Klaas. Klaas stated that she was pregnant and en route to the doctor when she began experiencing such excruciating pain she could no longer drive. Under cross-examination, however, Klaas admitted she did not tell the officer who arrested the defendant of her condition, she proceeded to the sheriff's station, and she did not seek any medical attention that day. Additionally, evidence indicated the defendant made no statement to the officer upon arrest of any impending medical emergency.
The court's inquiry with respect to "justification for crime" does not indicate ignorance or misapprehension of the law. The court was clearly apprised of defendant's assertion of necessity. The court allowed the defendant's presentation of the defense and deemed such evidence insufficient. In light of the lesser burden of proof required at the probation revocation hearing, it was well within the court's discretion to discount the defendant's claim of necessity.
In People v. Allegri (1985), 109 Ill.2d 309, 487 N.E.2d 606, the supreme court held that an insanity defense is unavailable in a probation revocation hearing in light of the relaxed due process requirement inherent in such proceedings. Since the court distinguished, but did not discuss the admissibility of justification-type defenses, it is unclear whether a defendant may present such a defense in a probation revocation hearing. We, however, feel this case inappropriate to further address the ramifications of Allegri in light of the insufficient nature of the evidence of necessity presented.
 3 The defendant next maintains that during closing argument, the prosecutor made comments which were a prejudicial misstatement of the law of necessity. We find this argument without merit. The court is presumed to know the law and its decision shall stand unless it can be affirmatively shown that the court was improperly influenced by the misleading remarks of counsel. (People v. Morgan (1986), 112 Ill.2d 111, 492 N.E.2d 1303, cert. denied (1987), 479 U.S. ___, 94 L.Ed.2d 180, 107 S.Ct. 1329.) Although the State may have misrepresented the law of necessity, there is no indication the court considered such statements. Additionally, we note that even if the court did misapprehend the law, such error was harmless in light of the evidence adduced at the hearing.
*943  4, 5 Defendant's third contention on appeal alleges ineffective assistance of counsel. Following closing argument, the court asked defense counsel whether "there is such a thing as justification for crime." Defense counsel responded that he "couldn't find anything." On appeal, the defendant maintains that counsel's failure to provide applicable case law renders his assistance of counsel constitutionally defective for want of acting as an advocate.
In Strickland v. Washington (1984), 466 U.S. 668, 80 L.Ed.2d 674, 104 S.Ct. 2052, the Supreme Court established requisites for a claim of ineffective assistance of counsel. To prevail, a defendant must show: (1) counsel's representation fell below an objective standard of reasonableness; and (2) the deficient performance prejudiced the defendant, thereby depriving him of a fair trial, and but for such deficiencies, the result of the proceedings would have been different. (466 U.S. 668, 687, 80 L.Ed.2d 674, 693, 104 S.Ct. 2052, 2064; see also People v. Elam (1987), 156 Ill. App.3d 685, 509 N.E.2d 698.) The benchmark for judging any claim of ineffectiveness must be whether counsel's conduct "so undermined the proper functioning of the adversarial process that the trial cannot be relied on as having produced a just result." Strickland v. Washington (1984), 466 U.S. 668, 686, 80 L.Ed.2d 674, 692-93, 104 S.Ct. 2052, 2064.
The defendant asserts his counsel failed to act as an advocate and prejudice may be presumed therefrom. In support of this contention, the defendant relies upon two cases where counsel failed to advance any theory of defense and merely sought to introduce evidence in mitigation of a more severe sentence. (See People v. Hattery (1985), 109 Ill.2d 449, 488 N.E.2d 513, cert. denied (1986), 478 U.S. 1038, 92 L.Ed. 727, 106 S.Ct. 3314; People v. Weir (1985), 131 Ill. App.3d 562, 475 N.E.2d 1033.) Such was not the case herein. As a result, prejudice cannot be presumed.
Defense counsel presented much testimony in support of defendant's theory of necessity. Counsel cross-examined the State's witnesses and argued defendant's theory during closing. It was only after the close of the case that defense counsel, when asked about justification for crimes, could not respond to the court. The colloquy referred to by defendant is somewhat unclear. Defense counsel stated that he could not find anything with respect to justification for driving while license revoked. The record seems to indicate that counsel was specifically referring to lack of any specific statutory provision or factually analogous case law. These statements do not indicate a lack of advocacy.
 6 Additionally, the defendant has failed to show that the outcome *944 of his probation revocation hearing would have been different but for the alleged deficiencies of counsel. The defendant presented much evidence in support of his claim of necessity and this evidence was discounted by the trial court. There was no evidence, other than from defendant's witnesses, that a medical emergency actually occurred. In fact, when questioned, defendant's girlfriend admitted she never sought any medical treatment on the day in question. Consequently, the existence of such impending circumstances was a credibility issue for the court to decide. As such, defendant's claim of ineffective assistance is unsupported.
 7 Defendant's final assertion of error concerns the judgment. At the sentencing hearing, the court indicated that the defendant should be given credit for time served on probation as well as time served in pretrial custody. The judgment order, however, did not reflect this credit. On appeal, the defendant maintains and the State concedes that he should be given credit for the proper amount of time (466 days) as directed by the court.
The Unified Code of Corrections vests the trial court with discretion to credit a defendant for "[t]ime served on probation, conditional discharge or supervision" following revocation of probation. (Ill. Rev. Stat. 1985, ch. 38, par. 1005-6-4(h).) Consequently, it was within the power of the trial court herein to grant defendant credit for all time on probation and in pretrial custody. As a result, the mittimus must be corrected. Based on the foregoing, the order of the circuit court is affirmed and the judgment and mittimus order is remanded to the trial court to be corrected so that it accurately reflects the proper amount of credit due the defendant for time served.
Affirmed in part and remanded with directions.
SPITZ, P.J., and KNECHT, J., concur.
