Boost.DateTime: ISO Timestamp Parsing Bug

Hello I already sent this patch earlier this year but got no response. 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. Regards, Peter.

On 11/19/2010 8:43 AM, Peter Klotz wrote:
Hello
I already sent this patch earlier this year but got no response. <snip>
It would get tended to if you filed a bug at http://svn.boost.org, selected the "date_time" component, and attached the patch. I don't think the date_time authors monitor this list very closely. -- Eric Niebler BoostPro Computing http://www.boostpro.com

Hello Eric
Eric Niebler
I already sent this patch earlier this year but got no response.
<snip>
It would get tended to if you filed a bug at http://svn.boost.org, selected the "date_time" component, and attached the patch. I don't think the date_time authors monitor this list very closely.
I created ticket 4870 (https://svn.boost.org/trac/boost/ticket/4870) to track this bug. Regards, Peter.
participants (2)
-
Eric Niebler
-
Peter Klotz