When was the last time an earthquake hit San Francisco?

The last earthquake to hit San Francisco was on August 24, 2020. It was a magnitude 4.5 earthquake that struck at 8:33 PM local time.