A time scale is a procedure for accurately and continuously marking the passage of time. It is exemplified by Coordinated Universal Time (UTC) and provides the backbone for critical navigation tools such as the Global Positioning System. Present time scales employ microwave atomic clocks, whose attributes can be combined and averaged in a manner such that the composite is more stable, accurate, and reliable than the output of any individual clock. Over the past decade, clocks operating at optical frequencies have been introduced that are orders of magnitude more stable than any microwave clock. However, in spite of their great potential, these optical clocks cannot be operated continuously, which makes their use in a time scale problematic. We report the development of a hybrid microwave-optical time scale, which only requires the optical clock to run intermittently while relying upon the ensemble of microwave clocks to serve as the flywheel oscillator. The benefit of using a clock ensemble as the flywheel oscillator instead of a single clock can be understood by the Dick-effect limit. This time scale demonstrates for the first time subnanosecond accuracy over a few months, attaining a fractional frequency stability of 1.45 × 10-16 at 30 days and reaching the 10-17 decade at 50 days, with respect to UTC. This time scale significantly improves the accuracy in timekeeping and could change the existing time-scale architectures.