Re: [Boost-bugs] [Boost C++ Libraries] #1861: time_duration type can not be correctly written or read of the period spans 24 hours of more (vc9 and probably others).

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1861: time_duration type can not be correctly written or read of the period spans 24 hours of more (vc9 and probably others).
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-11 21:13:55


#1861: time_duration type can not be correctly written or read of the period spans
24 hours of more (vc9 and probably others).
-------------------------------+--------------------------------------------
  Reporter: ilya_at_[hidden] | Owner: az_sw_dude
      Type: Patches | Status: reopened
 Milestone: To Be Determined | Component: date_time
   Version: Boost 1.38.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Changes (by ilya.bobir_at_[hidden]):

 * cc: ilya.bobir_at_[hidden] (added)
  * status: closed => reopened
  * version: Boost Development Trunk => Boost 1.38.0
  * resolution: fixed =>

Comment:

 I think that the default format for the time_duration should be changed to
 contain %O instead of %H as time_duration objects can by default contain
 unrestricted hours value. This change affects time_duration input and
 output only.

 I've wrote tests in order to catch bugs with time_period objects not been
 capable of processing values that are longer then 24 hours.

 One of the tests showed a bug in the
 boost/date_time/format_date_parser.hpp:var_string_to_int(). The function
 was able to read after the input data end in some cases.

 All of these are contained in the patch
 (date_time_long_hours_patch2.patch):
   1. The default time_duration format value is changed to %O:%M:%S%F
 instead of %H:%M:%S%F.
   2. A number of tests added that deal with time_duration values longer
 then 24 hours.
   3. Bug in the
 boost/date_time/format_date_parser.hpp:var_string_to_int() fixed.
   4. Documentation changes. Default format specifications for
 time_duration updated. And the %H should probably be documented along
 with %O.

 I think that 1 and 2 are definitely a continuation of the original bug
 thus I decided to reopen it instead of creating a new one.

 The diff is against the 1.38.0 but the relevant files are identical to
 those in trunk at the moment.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/1861#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC