We consider a zero mean discrete time series, and define its discrete Fourier transform (DFT) at the canonical frequencies. It can be shown that the DFT is asymptotically uncorrelated at the canonical frequencies if and only if the time series is second-order stationary. Exploiting this important property, we construct a Portmanteau type test statistic for testing stationarity of the time series. It is shown that under the null of stationarity, the test statistic has approximately a chi-square distribution. To examine the power of the test statistic, the asymptotic distribution under the locally stationary alternative is established. It is shown to be a generalized non-central chi-square, where the non-centrality parameter measures the deviation from stationarity. The test is illustrated with simulations, where is it shown to have good power.