Okay now this is for all with similar query. Ideally you shouldn't buy a ticket with a layover of more than 5 hours unless you plan to visit the transit country. Now, if you have a connecting flight from the same airport (irrespective of the terminal), you need not worry about transit visa at all even if your stay is over 10 hours. It's just that you will need to sit here and there and also you can try your hands on Piano as they have one almost next to all terminals (within your access, which means you need not pass through IO). Now, if you feel like having a look outside in London, you should carry your connecting flight ticket and other documents with you at IO, you can be issued a transit visa of 48 hours instantly without any wait. Though there is a fee of 64 pounds, but I have never paid that fee out of my three transit visits to London (now travel history may have impacted this as I have two business visa of UK and one tourist - all have expired though).
Yes, to be 100% sure, you can apply for the transit visa at your home country, but isn't it stupid to waste so much of money unless you are really planning to see London (and if you do, then 10 to 15 hours will fetch you actual tourist time of 5 go 8 hours which means at max you can go to Hayes street and come back). Considering all the charges, like taxi, transit visa fee, then if there is a night, you may need a hotel as well, so over all you will be spending close to 200 Dollars for all this. And you must have taken this ticket just to save money.
Another good news for you is, I don't know what time your flight lands at Heathrow, Jet flights usually land there at around 8pm to 10pm UK time and Air Canada usually operates from morning (UK time), which means you won't even get to meet Air Canada, should there be a need until next morning.
So, in a nutshell, if you have no plan of visiting UK, it was a F****D up decision to buy such ticket.
Wish you luck.
Cheers!