Boost C++ Libraries: Ticket #9186: posix_time and time zones
https://svn.boost.org/trac10/ticket/9186
<p>
Hi,
</p>
<p>
When I use something like:
boost::posix_time::time_from_string("2013-09-29 23:36:54.565+02");
</p>
<p>
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> >'
</p>
<blockquote>
<p>
what(): bad lexical cast: source type value could not be interpreted as target
</p>
</blockquote>
<p>
Aborted
</p>
<p>
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");
</p>
<p>
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.
</p>
<p>
None of the functions that convert it to strings seem to be able to have a time zone in it.
</p>
<p>
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.
</p>
<p>
PS: The documentation has 3 times tm_isddst in it instead of tm_isdst.
</p>
en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/9186
Trac 1.4.3