Second-harmonic Generation Spectroscopy from Time-dependent Density-functional Theory