Opened 10 years ago

#6860 new Bugs

Cannot read negative time_duration

Reported by: damienrg+bug@… Owned by: az_sw_dude
Milestone: To Be Determined Component: date_time
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

Loading a negative time_duration saved with operator<< does not work.

Test program:

#include <cassert>
#include <sstream>

#include <boost/date_time.hpp>

int main()
{
  boost::posix_time::time_duration expected(0, 0, 0, -1);
  std::stringstream stream;
  stream << expected;
  boost::posix_time::time_duration time;
  stream >> time;
  assert(expected == time);
  return 0;
}

Attachments (1)

negative_time_duration.patch (663 bytes ) - added by anonymous 10 years ago.

Download all attachments as: .zip

Change History (1)

by anonymous, 10 years ago

Note: See TracTickets for help on using tickets.