[ https://issues.apache.org/jira/browse/STDCXX-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525876 ]
Travis Vitek commented on STDCXX-223: ------------------------------------- This is actually already implemented and is being tested by 22.locale.time.put.cpp:666-678. In my manual runs I have noticed that the test actually crashes because the MSCRT strftime doesn't support %T, %e, or %G and the test crashes. This doesn't appear to happen on all configurations because these tests are running to completion on some of the nightly builds. I think the rw_strftime() that is inside the test could be expanded to avoid the assert inside the CRT so that the test would pass on all windows configurations. > [Windows] std::time_put %c time format specifier not implemented > ---------------------------------------------------------------- > > Key: STDCXX-223 > URL: https://issues.apache.org/jira/browse/STDCXX-223 > Project: C++ Standard Library > Issue Type: Bug > Components: 22. Localization > Affects Versions: 4.1.2, 4.1.3, 4.1.4 > Environment: Windows > Reporter: Martin Sebor > Assignee: Travis Vitek > Fix For: 4.2.1 > > > Moved from the Rogue Wave bug tracking database: > ****Created By: sebor @ Apr 29, 2003 01:34:21 PM**** > -------- Original Message -------- > Subject: puzzle > Date: Tue, 22 Apr 2003 12:31:46 -0600 > From: "L. Nicoara" <[EMAIL PROTECTED]> > To: Martin Sebor <[EMAIL PROTECTED]> > This program prints A - Windows, VC7 (also 15d). Is there anything > obviously wrong with it? > Liviu > #include <iostream> > #include <sstream> > #include <locale> > #include <cstring> > int main () > { > const char* fmt = "%c"; > tm t = tm (); > t.tm_sec = 0; > t.tm_min = 0; > t.tm_hour = 0; > t.tm_mday = 13; > t.tm_mon = 8; > t.tm_year = 67; > t.tm_wday = 3; > t.tm_isdst = 0; > typedef std::ostreambuf_iterator<char> iter_t; > std::locale loc ("C"); > std::ostringstream os; > iter_t os_iter(os.rdbuf ()); > const std::time_put<char,iter_t>& fac = > std::use_facet<std::time_put<char,iter_t> >(loc); > fac.put(os_iter,os,os.fill(), &t, fmt, fmt + std::strlen (fmt)); > std::cout << "Date-time : " << os.str().c_str () << std::endl; > return 0; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.