No, that's not correct. Or, rather, it would only be correct on the equator at the equinox, when the sun rises and sets straight up and traces a full great circle across the sky.
Instead, start with the formula for the solar elevation angle $\theta_\mathrm{s}$,
$$\sin \theta_\mathrm{s} = \cos h \cos \delta \cos \Phi + \sin \delta \sin \Phi,$$
and solve for the hour angle $h$ (in the local solar time):
$$\cos h = \frac{\sin \theta_\mathrm{s} - \sin \delta \sin \Phi}{\cos \delta \cos \Phi}$$
where $\delta$ is the current sun declination, $\Phi$ is the local latitude and $\theta_\mathrm{s} = -18^\circ$ (plus a correction for atmospheric refraction, if that's not already included in the 18° figure).