Torat Kohanim said that one who desecrates the appointed times is regarded as if he desecrated the Shabbatot. This need not contradict the Rambam, for Chazal sometimes speak in exaggerated terms to enlarge the severity of a prohibition. It is not the law that such a person is like a non-Jew and that his wine is yayin nesech.