The short-term operation of a power system is usually planned by solving a day-ahead unit commitment problem. Because of historical reasons, the commitment of power generating units is decided over a time horizon typically consisting of the 24 hourly periods of a day. In this paper, we show that, as a result of the increasing penetration of intermittent renewable generation, this somewhat arbitrary and artificial division of time may prove to be significantly suboptimal and counterproductive. Instead, we propose a time-adaptive day-ahead unit commitment formulation that better captures the net-demand variability throughout the day. The proposed formulation provides the commitment and dispatch of thermal generating units over a set of 24 time periods too, but with different duration. To do that, we use a clustering procedure to select the duration of those adaptive time periods taking into account the renewable generation and demand forecasts. Numerical results show that, without increasing the computational burden, the proposed time-adaptive unit commitment allows us for a more efficient use of the system flexibility, which translates into a lower operating cost and a higher penetration of renewable production than those achieved by a conventional hourly unit commitment problem.