Boost 1.42.0: DateTime ISO Timestamp Parsing Fix
13 Jul
2010
13 Jul
'10
9:53 a.m.
Boost.DateTime 1.42.0 falsely converts "20100713" into "20100713T201007.300000" using from_iso_string(). Example Code: const boost::posix_time::ptime time=boost::posix_time::from_iso_string("20100713"); std::cout << boost::posix_time::to_iso_string(time) << std::endl; Current Result: 20100713T201007.300000 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(). We assume this behaviour to be better than creating a ptime that contains wrong values. Regards, Peter.
5238
Age (days ago)
5238
Last active (days ago)
0 comments
1 participants
participants (1)
-
Peter Klotz