I’m in the US, where a phone number looks like this:
without country code: 123-456-7890
with country code: +1 123-456-7890
Now, according to Wikipedia, a phone number in Italy has this format:
347 xxxxxxx (from within Italy)
So that could look like a US number: 347-123-4567
When I open all my contacts on WhatsApp, it automatically adds the country code, so if I have a US phone 123-456-7890, it adds a +1. But how does it know it’s a US number? It could have been anything.
I guessed that it uses my current locale or timezone to determine where I am, and any phone numbers that don’t have a country code, just add the current user’s country code. But I changed my locale settings in my iPhone and it was still able to guess which country the number belongs to.
Any idea how that’s possible?
Update: Also, I just tried adding a new phone number while my phone was in airplane mode while my region settings were set to Italian while my timezone was set to Rome, Italy, and it still knew I put a US number, so it can’t possibly be connecting to a server to get this info.
WhatsApp knows what country code you are ‘in’ because you have verified your own phone number with WhatsApp. Phone numbers that don’t have an explicit international format, meaning they don’t start with ‘+’ or ’00’, are checked against your own verified country code. This is how WhatsApp knows to use country code 1 in your case.