An earthquake of magnitude 3.1 and depth of 9.20 kilometers occurred 1.88 miles from San Ramon, CA in Contra Costa County at 12:34 AM.