[Boost-bugs] [Boost C++ Libraries] #7572: boost::gregorian::to_tm() does not fill in tm_gmtoff and tm_zone fields of the resulting std::tm structure

Subject: [Boost-bugs] [Boost C++ Libraries] #7572: boost::gregorian::to_tm() does not fill in tm_gmtoff and tm_zone fields of the resulting std::tm structure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-25 14:55:10


#7572: boost::gregorian::to_tm() does not fill in tm_gmtoff and tm_zone fields of
the resulting std::tm structure
-------------------------------+--------------------------------------------
 Reporter: izimenkov@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
-------------------------------+--------------------------------------------
 On Fedora 15 (and maybe on other OSes), std::tm contains fields describing
 the time zone:

 {{{
 #ifdef __USE_BSD
   long int tm_gmtoff; /* Seconds east of UTC. */
   __const char *tm_zone; /* Timezone abbreviation. */
 #else
   long int __tm_gmtoff; /* Seconds east of UTC. */
   __const char *__tm_zone; /* Timezone abbreviation. */
 #endif
 }}}

 boost::gregorian::to_tm() (and boost::posix_time::to_tm() respectively)
 does not fill in these fields. So these fields contain garbage. Other code
 can be misleaded with values of these uninitialized fields.

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