A 3.9 magnitude earthquake struck near the San Francisco area of California in the early hours of Tuesday morning, the U.S.