In the first situation you should use: It is not the first time that my accent has given me away , because it has happened in the past (that someone knew where you are from) and it still happens, so you should use the present perfect. I personally would use this for your second example: It was not the first time that my accent had given me away. I don't really have an explanation for this, it just sounds better:P
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.