Ecological dynamics in a non-stationary world