Ten years after enactment.. So barring an early general election 2030 absolute minimum. For those of us who buy used and drive our vehicles until they fall apart it could be another decade before we give up the petrol engine. Or more, my household count (cars and motorcycles) is 5, years of manufacture 2006, 2006, 2005, 1994, 1992.
I'm a petrol head, my instinctive reaction is against this but as a spur to further development and adoption of the technology particually in terms of affordability, maybe a deadline would be a good thing and with the current state of the tech and uptake a decade doesn't seem ridiculous to me. You're right about popularity, but people bitched about removing lead from petrol too. I think the worst thing about it as an aspirational policy is that it will generate "Corbyn will ban YOUR car" headlines rather than actual discussion.