id summary reporter owner description type status milestone component version severity resolution keywords cc 6664 std::setw() is ignored by operator<< for ptime, time_duration, and date Mark van Dijk az_sw_dude "The following complete program demonstrates the issue. when using operator<< to display a ptime/time_duration/date, then the setw() manipulator is ignored. My development environment is boost 1.48, building a 32-bit app on Win7 (x64) under VS2008. I consider this a cosmetic issue as there is a very simple work-aroud - simply manually convert the ptime/date/duration object to a string before inserting it into the ostream object. {{{ #include #include #include #include #include int main() { boost::posix_time::ptime const now = boost::posix_time::second_clock::local_time(); std::cout << ""\ncorrectly formatted: "" << std::setw(40) << boost::posix_time::to_simple_string(now) << ""\nptime: "" << std::setw(40) << now << ""\ntime_duration: "" << std::setw(40) << now.date() << ""\ndate: "" << std::setw(40) << now.time_of_day() << std::endl; } }}} " Bugs new To Be Determined date_time Boost 1.48.0 Cosmetic stream manipulator ptime setw