Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72132 - trunk/boost/date_time
From: marshall_at_[hidden]
Date: 2011-05-24 11:11:39


Author: marshall
Date: 2011-05-24 11:11:37 EDT (Tue, 24 May 2011)
New Revision: 72132
URL: http://svn.boost.org/trac/boost/changeset/72132

Log:
Applied patch; refs #1674
Text files modified:
   trunk/boost/date_time/date_formatting.hpp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/boost/date_time/date_formatting.hpp
==============================================================================
--- trunk/boost/date_time/date_formatting.hpp (original)
+++ trunk/boost/date_time/date_formatting.hpp 2011-05-24 11:11:37 EDT (Tue, 24 May 2011)
@@ -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();
       }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk