
6 Dec
2005
6 Dec
'05
5:14 p.m.
I'm trying to use Boost 1.33 libs on x64 Windows platform. Have assert break when try to use date below year 1900. Is it known issue? To reproduce: #include "stdafx.h" #include <iostream> #include <boost/date_time/local_time/local_time.hpp> int _tmain(int argc, _TCHAR* argv[]) { using namespace boost::gregorian; using namespace std; date d(1899, Jan, 1); stringstream ss; ss << d; cout << ss << endl; return 0; } The cause located in conversion.hpp module and strftime() assert : boost::gregorian::date::ymd_type ymd = d.year_month_day(); datetm.tm_year = ymd.year-1900; _VALIDATE_RETURN( ( timeptr->tm_year >=0 ), EINVAL, FALSE) Thanks, Dmitry Solodkiy, SW engineer