|
Boost Users : |
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net