The fly Drosophila melanogaster possesses five photoreceptors and/or photopigments that appear to be involved in light reception and synchronization of the circadian clock: (1) the compound eyes, (2) the ocelli, (3) the Hofbauer-Buchner eyelets, (4) the blue-light photopigment cryptochrome, and (5) unknown photopigments in the clock-gene-expressing dorsal neurons. To understand the contributions of these photoreceptors and photopigments to synchronization, the authors monitored the flies' activity rhythms under artificial long and short days. They found that all the different photoreceptors and photopigments contribute significantly to entrainment under each photoperiod, but the compound eyes are especially important for entrainment to extreme photoperiods. The compound eyes are, furthermore, necessary for adjusting the phase of the activity rhythm, for distinguishing long days from constant light, and for the normal masking effects of light--namely, promotion of activity by lights-on and inhibition of activity by darkness. Cryptochrome is important for period lengthening under long days, although it is more important for entrainment to short days than to long days and is, furthermore, important for aftereffects of the photoperiod on the internal clock. The specific roles of the remaining photoreceptors are more difficult to assess.