Boost C++ Libraries: Ticket #1903: [date_time] - 1.34+ c_local_adjustor derefs null pointer for dates >2038 https://svn.boost.org/trac10/ticket/1903 <p> <em> utc_test.cpp : Defines the entry point for the console application. </em> </p> <p> #define BOOST_DATE_TIME_NO_LIB </p> <p> #include "boost/date_time/posix_time/posix_time.hpp" #include "boost/date_time/local_time_adjustor.hpp" #include "boost/date_time/c_local_time_adjustor.hpp" </p> <p> int main() { </p> <blockquote> <p> using namespace boost::posix_time; using namespace boost::gregorian; </p> </blockquote> <blockquote> <p> <em>This local adjustor depends on the machine TZ settings-- highly dangerous! typedef boost::date_time::c_local_adjustor&lt;ptime&gt; local_adj; ptime t10(date(2040,Jan,1), hours(7)); ptime t11 = local_adj::utc_to_local(t10); </em></p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1903 Trac 1.4.3 Andrey Semashev Thu, 13 Nov 2008 18:02:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1903#comment:1 https://svn.boost.org/trac10/ticket/1903#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Although I could not reproduce the problem, I think that I've fixed it in trunk. </p> Ticket