Our duration estimation flexibly adapts to the statistical properties of the temporal context. Humans and non-human species exhibit a perceptual bias towards the mean of durations previously observed as well as serial dependence, a perceptual bias towards the duration of recently processed events. Here we asked whether those two phenomena arise from a unitary mechanism or reflect the operation of two distinct systems that adapt separately to the global and local statistics of the environment. We employed a set of duration reproduction tasks in which the target duration was sampled from distributions with different variances and means. The central tendency and serial dependence biases were jointly modulated by the range and the variance of the prior, and these effects were well-captured by a unitary mechanism model in which temporal expectancies are updated after each trial based on perceptual observations. Alternative models that assume separate mechanisms for global and local contextual effects failed to capture the empirical results.