I think the question is, a local of which part of the city?
Everyone in Kensington and Chelsea (and other parts of west London) is from somewhere else, whether that's elsewhere in the UK or another country. As a result, I'd say you're a local once you're settled, you know your way around and you're on a first name basis with the bartenders
at your local.
To be a local in other parts of London (particularly those that are less desirable and therefore dominated by people whose families have been there for generations or poorer immigrants), you've not only got to be born there but I expect that in some cases your father and grandfather must have been too. But then you're a Cockney.