When you checked in for your flights from Glasgow to Cairo, your passport and ticket details would have been recorded and sent to the government, so they will know exactly when you departed when they search your records for your next visa application.