27 Time library [time]

27.9 Class template hh_­mm_­ss [time.hms]

27.9.3 Non-members [time.hms.nonmembers]

template<class charT, class traits, class Duration> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const hh_mm_ss<Duration>& hms);
Effects: Equivalent to:
return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:%T}"), hms);
Example
:
for (auto ms : {-4083007ms, 4083007ms, 65745123ms}) {
  hh_mm_ss hms{ms};
  cout << hms << '\n';
}
cout << hh_mm_ss{65745s} << '\n';
Produces the output (assuming the "C" locale):
-01:08:03.007
01:08:03.007
18:15:45.123
18:15:45
— end example
 ]