[Boost-bugs] [Boost C++ Libraries] #9186: posix_time and time zones

Subject: [Boost-bugs] [Boost C++ Libraries] #9186: posix_time and time zones
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-01 21:07:28


#9186: posix_time and time zones
------------------------------+------------------------
 Reporter: kurt@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 Hi,

 When I use something like:
 boost::posix_time::time_from_string("2013-09-29 23:36:54.565+02");

 I end up with:
 terminate called after throwing an instance of
 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast>
>'
   what(): bad lexical cast: source type value could not be interpreted as
 target
 Aborted

 However, the following 2 do work:
 boost::posix_time::time_from_string("2013-09-29 23:36:54.565123+02");
 boost::posix_time::time_from_string("2013-09-29 23:36:54.565");

 It also doesn't seem to be doing anything with the +02. When I use
 to_tm() regardless of what is behind the +, I always get the 23 in
 tm_hour. The glibc extension tm_gmtoff is also always set to 0.

 None of the functions that convert it to strings seem to be able to have a
 time zone in it.

 I really don't understand why there isn't any support for time zones. A
 time without time zone seems to be totally useless to me.

 PS: The documentation has 3 times tm_isddst in it instead of tm_isdst.

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