||Understanding the determinants of cognitive achievement and improving the efficiency of the educational system requires knowledge the time-of-day effects on the learning process. As productivity may vary during different times of the day depending on academic task at hand, there may be different optimal times to schedule a maths, history or language class, respectively. Using a decade-long panel dataset of academic scores in different subjects from a humanities high school, I estimate value-added and fixed effects specifications of a dynamic educational production function. Exogenous variation from random allocation to morning and afternoon school start times enables the identification of an afternoon effect. The findings indicate significantly lower maths scores during afternoon classes by 0.082 (0.018) and higher test scores for history classes by 0.069 (0.029) standard deviations, respectively. Using a natural experiment of a transitioning from a double-shift to a morning-only school schedule, I estimate difference-in-difference model of regime change. In a quantile regression, I investigate the distinct impacts of the covariates at different segments of the grade distribution and find that students with the lowest grades stand to lose most by having classes scheduled in the afternoon. These results point to a cost-effective way to achieve better academic performance with more effective organisation of school inputs accounting for the time-of-day effects.