Although time is a fundamental dimension of life, we do not know how brain areas cooperate to keep track and process time intervals. Notably, analyses of neural activity during learning are rare, mainly because timing tasks usually require training over many days. We investigated how the time encoding evolves when animals learn to time a 1.5 s interval. We designed a novel training protocol where rats go from naive- to proficient-level timing performance within a single session, allowing us to investigate neuronal activity from very early learning stages. We used pharmacological experiments and machine-learning algorithms to evaluate the level of time encoding in the medial prefrontal cortex and the dorsal striatum. Our results show a double dissociation between the medial prefrontal cortex and the dorsal striatum during temporal learning, where the former commits to early learning stages while the latter engages as animals become proficient in the task.