Boost logo

Boost Users :

From: Larry Knain (yg-boost-users_at_[hidden])
Date: 2003-08-29 17:52:59

I was trying to use the date_time ptime functions with ISO syle input
(boost 1.30.2 with MSVC++6 SP5). The function
parse_undelimited_time_duration in time_parsing has
three short variables hours, min, and sec that are uninitialized which
lead to unpredictable
results. These are at line 99. I stumbled on to this when I passed a
string "20011027T0202"
to ptime(from_iso_string()). To my surprise when I printed the value out
it came back as
20011026T222345! The code works OK as is if you always pass a full
This must have been found in parse_delimited_time_duration as it has
unsigned shorts that
are intialized to zero.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at