Boost C++ Libraries: Ticket #3126: boost::format in debug build is no longer able to format time_duration with hours >= 100, as of svn rev 49874 https://svn.boost.org/trac10/ticket/3126 <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/changeset/49874"><span class="icon">​</span>https://svn.boost.org/trac/boost/changeset/49874</a> breaks boost::format's ability to format a time_duration if it has more than 99 hours. </p> <p> It is unclear from the docs whether this is intended behaviour or not. I believe it is because boost::format uses the default time_facet format of "%H:%M:%S%F". Had it been using "%O:%M:%S%F", I think there would have been no breakage(?) </p> <p> The attached minimal program illustrates the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3126 Trac 1.4.3 mbd@… Wed, 03 Jun 2009 10:02:15 GMT attachment set https://svn.boost.org/trac10/ticket/3126 https://svn.boost.org/trac10/ticket/3126 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> <p> Minimal program that illustrates problems when formatting a time_duration with more than 99 hours. Make sure to use a debug build of boost to get an assertion. </p> Ticket Samuel Krempp Sat, 14 Nov 2009 22:35:47 GMT status, component, severity changed; cc, resolution set https://svn.boost.org/trac10/ticket/3126#comment:1 https://svn.boost.org/trac10/ticket/3126#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">Samuel.Krempp@…</span> added </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>component</strong> <span class="trac-field-old">format</span> → <span class="trac-field-new">date_time</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Not Applicable</span> </li> </ul> <p> boost::format only forwards to iostream without any specific handling, the issue is thus about date_time's output operators - or that behavious is intended. </p> <p> If you do not specify the desired formatting through the locale (see <a href="http://www.boost.org/doc/libs/1_40_0/doc/html/date_time/date_time_io.html">http://www.boost.org/doc/libs/1_40_0/doc/html/date_time/date_time_io.html</a>) and set boost::format to use it, then boost::format simply use default locale. </p> <p> I am not familiar with boost::date_time but assumes the assertion in the attached case is intended. </p> Ticket mbd@… Sun, 15 Nov 2009 12:47:17 GMT <link>https://svn.boost.org/trac10/ticket/3126#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3126#comment:2</guid> <description> <p> In fact, I think it would be more appropiate to file this as a duplicate of issue 1861, which appears to have been resolved 6 weeks ago. I have yet to check. </p> <p> As 1861 indicates, this is (was) a real issue. I am not certain that 1861 *does* fix this issue, but if not, I actually believe that this issue should be resolved. </p> <p> Regards </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Samuel Krempp</dc:creator> <pubDate>Sun, 15 Nov 2009 13:20:03 GMT</pubDate> <title>status, severity changed; resolution deleted https://svn.boost.org/trac10/ticket/3126#comment:3 https://svn.boost.org/trac10/ticket/3126#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Not Applicable</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> You're right, I'll reopen it just to mark it correctly </p> Ticket Samuel Krempp Sun, 15 Nov 2009 13:20:48 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3126#comment:4 https://svn.boost.org/trac10/ticket/3126#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1861" title="#1861: Patches: time_duration type can not be correctly written or read of the period ... (closed: fixed)">#1861</a> (which is fixed) </p> Ticket