Subject: [Boost-bugs] [Boost C++ Libraries] #4870: ISO Timestamp Parsing Bug
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-19 14:57:38
#4870: ISO Timestamp Parsing Bug
------------------------------------------+---------------------------------
Reporter: peter.klotz@⦠| Owner: az_sw_dude
Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
------------------------------------------+---------------------------------
boost::posix_time::from_iso_string() converts "20100713" into
"20100713T201007.300000" which is obviously wrong.
The error is caused by boost::date_time::split().
The attached patch corrects split() so that an exception is thrown later
in parse_delimited_time_duration().
The problem is reproducible in Boost 1.42.0 and 1.44.0.
This simple example demonstrates the issue:
const boost::posix_time::ptime
time=boost::posix_time::from_iso_string("20100713");
std::cout << "Converted: " << boost::posix_time::to_iso_string(time) <<
std::endl;
Converted: 20100713T201007.300000
Maybe someone can apply this patch.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4870> 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:04 UTC