[Boost-bugs] [Boost C++ Libraries] #9089: missing locale in strings_from_facet.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #9089: missing locale in strings_from_facet.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-07 17:07:15


#9089: missing locale in strings_from_facet.hpp
------------------------------+------------------------
 Reporter: Jackarain | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 see my example:

 {{{
  std::locale::global(std::locale(""));
  boost::posix_time::ptime t;
  std::stringstream ss;
  std::string s = "Sat, 07-Sep-43 10:40:59 GMT";
  ss.str(s);
  boost::posix_time::time_input_facet* rfc850_date_workarround2 =
      new boost::posix_time::time_input_facet("%a, %d-%b-%y %H:%M:%S GMT");
  ss.imbue(std::locale(std::locale::classic(), rfc850_date_workarround2));
  ss >> t;
  if (t != boost::posix_time::not_a_date_time)
  {
     std::cout << ss.str() << std::endl;
  }
 }}}

 I expected the output:

 {{{
 2043-Sep-07 10:40:59
 }}}

 but in fact no output...

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9089>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC