A solution of the time-dependent advection-diffusion equation