It's capital when I'm in Los Angeles! (4)
I believe the answer is:
lima
'it's capital' is the definition.
(capital of Peru)
'i'm in los angeles' is the wordplay.
'i'm' becomes 'im' ().
'in' is an insertion indicator.
'los angeles' becomes 'LA' (abbreviation).
'im' going within 'la' is 'LIMA'.
'when' acts as a link.
(Other definitions for lima that I've seen before include "Mail to capital of Peru" , "Mail to Peru's capital" , "Send mail out to S America" , "Mail to Peru'd capital" , "South American capital" .)