|
Boost Users : |
From: Thomas Lemaire (thomas.lemaire_at_[hidden])
Date: 2006-04-29 08:03:12
** sorry if double posting, but I have not received my first mail, and also no
answers... **
Dear list,
I encounter a bug while reading a time_duration object, here is a short test
case, the results are obtained with boost 1.33.1, gcc4.0.3
using namespace boost::posix_time;
time_duration td1(0,0,0);
std::stringstream ss1("14:23:11.345678");
ss1 >> td1;
std::cout << td1 << std::endl; // 14:23:11.345678
time_duration td2(0,0,0);
std::stringstream ss2("18353:23:11.345678");
ss2 >> td2;
std::cout << td2 << std::endl; // 18:53:23
time_duration td3(0,0,0);
std::stringstream ss3("318353:23:11.345678");
ss3 >> td3;
std::cout << td3 << std::endl; // 00:00:00
If I compile with the flag
CPPFLAGS += -DUSE_DATE_TIME_PRE_1_33_FACET_IO
this works well.
I hope this will help to fix it...
-- thomas http://www.laas.fr/~tlemaire
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