Photoperiodic time measurement is the ability of plants and animals to measure differences in day versus night length (photoperiod) and use that information to anticipate critical seasonal transformations, such as annual temperature cycles. This timekeeping phenomenon triggers adaptive responses in higher organisms, such as gonadal stimulation, flowering, and hibernation. Unexpectedly, we observed this capability in cyanobacteria-unicellular prokaryotes with generation times as short as 5 to 6 hours. Cyanobacteria exposed to short, winter-like days developed enhanced resistance to cold mediated by desaturation of membrane lipids and differential programs of gene transcription, including stress response pathways. As in eukaryotes, this photoperiodic timekeeping required an intact circadian clockwork and developed over multiple cycles of photoperiod. Therefore, photoperiodic timekeeping evolved in much simpler organisms than previously appreciated and enabled genetic responses to stresses that recur seasonally.