A magnitude 2.7 earthquake rattled parts of central Oklahoma late Tuesday, according to the U.S. Geological Survey.