Boost C++ Libraries: Ticket #1726: boost/date_time/posix_time/time_formatters.hpp incorrectly formats fractional seconds using global locale https://svn.boost.org/trac10/ticket/1726 <p> The function boost::posix_time::to_iso_string_type() uses the ostream::operator&lt;&lt;() function to write the time. This later function will use the current global locale to format each of the elements of the time. In particular, when the global locale is set to en_US, the fractional will be formatted to be 123,456 when there are six digits, which is incorrect. </p> <p> The proposed solution is to temporarily imbue the ostream with the classic locale to disable formatting. The attached patch only applies this to the fractional seconds but it would be more robust to apply to the other time components as well. </p> <p> This type of error probably exists in other functions. In particular see Ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1674" title="#1674: Bugs: date_time::date_formatting.hpp: incorrectly formats year using global ... (closed: fixed)">#1674</a> which is the same error. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1726 Trac 1.4.3 jplejacq@… Fri, 28 Mar 2008 22:52:29 GMT attachment set https://svn.boost.org/trac10/ticket/1726 https://svn.boost.org/trac10/ticket/1726 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_date_time_posix_time_time_formatters_hpp.patch</span> </li> </ul> <p> patch </p> Ticket Dean Michael Berris Mon, 31 Jan 2011 14:30:45 GMT attachment set https://svn.boost.org/trac10/ticket/1726 https://svn.boost.org/trac10/ticket/1726 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-date-time-1726.patch</span> </li> </ul> <p> Updated patch to apply cleanly to <a class="changeset" href="https://svn.boost.org/trac10/changeset/68583" title="self contained headers complete">r68583</a> on trunk. </p> Ticket