Although time is a fundamental dimension of life, we do not know how the brain encodes the temporal information. Several brain areas underlie the temporal information, such as the hippocampus, prefrontal cortex, and striatum, but evidence of how they cooperate to process temporal information is scarce. Notably, the analysis of neural activity during learning are rare, mainly because timing tasks usually take a long time to train. Here 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 roles of the medial prefrontal cortex and the dorsal striatum during temporal learning, where the former commits to early learning stages while the latter become more engaged as animals become more proficient in the task.