# Fix for http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=yes&bug=473177
# Upstream http://svn.boost.org/trac/boost/ticket/1726
--- trunk.orig/boost/date_time/date_formatting.hpp
+++ trunk/boost/date_time/date_formatting.hpp
@@ -79,7 +79,13 @@
{
typedef typename ymd_type::month_type month_type;
std::basic_ostringstream<charT> 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());
+
if (format_type::has_date_sep_chars()) {
ss << format_type::month_sep_char();
}