[Boost-bugs] [Boost C++ Libraries] #9034: Timezone (%Q) is ignored in time_input_facet / local_time_input_facet

Subject: [Boost-bugs] [Boost C++ Libraries] #9034: Timezone (%Q) is ignored in time_input_facet / local_time_input_facet
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-22 12:19:17


#9034: Timezone (%Q) is ignored in time_input_facet / local_time_input_facet
-----------------------------------------+------------------------
 Reporter: Maurice Gilden <MauriceG@…> | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
-----------------------------------------+------------------------
 I'm trying to parse an extended ISO 8601 date-time string to ptime or
 local_time using the following code:

 {{{
         boost::local_time::wlocal_time_input_facet *inputFacet = new
 boost::local_time::wlocal_time_input_facet();
         inputFacet->set_iso_extended_format();
         std::wstringstream ss;
         ss.imbue(std::locale(ss.getloc(), inputFacet));
         ss.str(inputString);
         boost::local_time::local_date_time
 time(boost::local_time::not_a_date_time);
         ss >> time;
 }}}

 This works for "2013-08-20T17:14:21Z" or "2013-08-20T17:14:21", however it
 doesn't work as soon as I add a timezone to it, e.g.
 "2013-08-20T19:14:21+02" or "2013-08-20T19:14:21+02:00". As far as I can
 tell the error is because the timezone (%Q) is completely ignored in
 time_facet.hpp.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9034>
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:13 UTC