However, District Judge Ken Grant accepted that Gaba had bought the tickets legitimately online and only sold them at face value because he had been separated from a friend and didn't want to go to the match alone.
He told Gaba that touting the tickets would normally carry a 'severe' penalty, but waived a £300 fine because of the two nights he had already spent in custody.
Frances Lockhart, prosecuting, said: "On Saturday July 28th at around 12.55pm officers observed Kenneth Gaba selling what appeared to be Olympics tickets.
"This was in Wimbledon Park Road in SW19. Kenneth Gaba appeared to have something concealed in a newspaper which attracted the officers attention.
"They saw him speak to another man and then the pair of them walked down ten metres to a bus stop. They then saw him take two tickets and give them to this man.
"At that point the other man gave him two £50 notes. Mr Gaba was therefore at that point arrested by the officer."
She added: "Mr Gaba had £908 on him, but it is not related to the ticket sales. The money had been changed from dollars and the notes were in sequential order."
Defending Mr Gaba, Ros Olleson said: "Mr Gaba gave an interview in relation to this. It's completely borne out by the evidence.
"The tickets were bought legally in Canada online. He had come to the UK for a 10-day holiday to watch the Olympics.
"He had gone to the tennis separately from his friend. There had been a number of failed attempts to meet up but they got lost - it was very busy and there were a lot of diversions in place.
"Having realised that they were not going to meet up Mr Gaba thought he didn't want to go to the tennis on his own and sold the tickets at face value for £50 each.
"He fully admits that. He sold the tickets not knowing that it was illegal to do so."
Releasing Gaba, who wore a tracksuit top, shorts and trainers District Judge Grant said: "I do not know how the courts are approaching offences of this kind. Certainly the offence of selling tickets bearing in mind there is an established system to do so is going to be dealt with very severely."
"However, in your case I accept first of all what you said was true, that you had legitimately purchased the tickets yourself and that you were only selling these two tickets. Secondly, you sold them at face value.
"As a result of this you have spent two days in custody which I think exceeds the sentence I would have imposed.
"Normally I would deal with this offence by way of a fine of £300, but in this case I sentence you to a day's imprisonment which you have already served."