[Boost-bugs] [Boost C++ Libraries] #12699: posix_time\time_formatters removes trailing 0 fractional seconds

Subject: [Boost-bugs] [Boost C++ Libraries] #12699: posix_time\time_formatters removes trailing 0 fractional seconds
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-16 22:53:41


#12699: posix_time\time_formatters removes trailing 0 fractional seconds
-----------------------------------------------+------------------------
 Reporter: Jonathan Zuber <jonathan.zuber@…> | Owner: az_sw_dude
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.63.0 | Severity: Cosmetic
 Keywords: Time, Fractional Seconds, |
-----------------------------------------------+------------------------
 When calling boost::posix_time::to_iso_extended_string(), the returned
 format will differ depending on the value of the fractional seconds. This
 cannot be configured. In time_formatters.hpp, function
 'to_simple_string_type' checks if the value of the fractional seconds is 0
 (zero). If it is, it will not print the corresponding fractional seconds
 digits.

 I consider this a bug because if one is to display multiple ptimes in this
 format they could have differing widths which would not be visually
 appealing.

 I propose that this is changed to be either:

 1) User controlled. The user can set whether or not to print the
 characters.

 OR

 2) It should always print the fractional seconds digits.

 I believe that option 1) is the correct solution, though at the very least
 I believe option 2) to be more correct than the current implementation.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12699>
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:50:20 UTC