// time_duration can not be formatted with boost_format for more than 99 hours #include #include #include int main() { // Output for up to 24 is ok std::cout << boost::format( "%1%" ) % boost::posix_time::time_duration( 23, 59, 59, 9999 ) << std::endl; // This is still working std::cout << boost::format( "%1%" ) % boost::posix_time::time_duration( 99, 59, 59, 9999 ) << std::endl; // Stopped working as of revision https://svn.boost.org/trac/boost/changeset/49874 // This asserts with a debug build, in time_facet std::cout << boost::format( "%1%" ) % boost::posix_time::time_duration( 100, 0, 0, 0 ) << std::endl; }