--- boost-1.34.1.orig/boost/date_time/date_formatting.hpp +++ boost-1.34.1/boost/date_time/date_formatting.hpp @@ -79,7 +79,13 @@ { typedef typename ymd_type::month_type month_type; std::basic_ostringstream ss; + + // Temporarily switch to classic locale to prevent possible formatting + // of year with comma or other character (for example 2,008). + ss.imbue(std::locale::classic()); ss << ymd.year; + ss.imbue(std::locale::locale()); + if (format_type::has_date_sep_chars()) { ss << format_type::month_sep_char(); }