$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Boost.DateTime: ISO Timestamp Parsing Bug
From: Peter Klotz (Peter.Klotz_at_[hidden])
Date: 2010-11-19 08:43:54
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.