Opened 9 years ago
#9034 new Bugs
Timezone (%Q) is ignored in time_input_facet / local_time_input_facet
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | To Be Determined | Component: | date_time |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Note:
See TracTickets
for help on using tickets.