A Sheffield man travelled to Mansfield to buy cannabis before Ramadan, a court has heard.
Zarwar Hussain, 24, of Sturton Road, Sheffield, admitted possessing the Class B drug when he appeared before magistrates in Mansfield on Thursday.
Sanjay Jerath, prosecuting, said police stopped his car on Chesterfield Road South at 2.45am, on June 5, and found Hussain with a small quantity of the drug.
The court heard he had received a community order in October 2015 for criminal damage, but had only carried out 24 hours of the 90 hours of unpaid work imposed.
Cheryl Nisbet, of the probation service, said: “He was signed off sick because of depression and he tells me he may well be back on the same medication.
“He tells me that he smokes two spliffs a day and came into Mansfield with friends to buy the cannabis prior to Ramadan. He said that during Ramadan he desisted from smoking.
“We had a conversation about the fact that if he can give up for Ramadan he can give up permanently, and he agreed.”
Hussain, who said that he was supported financially by his brother, was fined £80 and ordered to pay a victim surcharge of £30 and costs of £85.