It depends. When you fly out of the country, your passport information is often logged by the airlines for pre-screening purposes at your destination. Your passport is also usually stamped by the countries you visited.When you travel across the border on the ground to Canada or Mexico passport information is rarely, if ever, recorded. In that case Cust of the border patrol have no way of knowing how long you are gone.I frequently walk across the border into Mexico. Sometimes they ask how long Iu2019ve been in Mexico, sometimes they do not.