Boost logo

Boost Users :

Subject: [Boost-users] Data_Time - Exception: could not convert calendar time to UTC time
From: Bruno Dutra (brunocodutra_at_[hidden])
Date: 2009-02-09 18:45:14


Hello folks,

Today I downloaded the new version of Boost, 1.38, and tried to compile and
run the Source listing for
Timer.5<http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/tutorial/tuttimer5/src.html>example
from Asio, but it was throwing the exception:

"could not convert calendar time to UTC time"

(Note that i'm building it under windows vista using MinGW GCC, which I
believe is not on the "tested compilers list of boost 1.38")

After some time traking the culprit, I got to the function
time_type microsec_clock::create_time(time_converter converter) from the
boost\date_time\microsec_time_clock.hpp header
in which the variable 'std::time_t t' was strangely assuming a negative
value, probably due to an overflow.

Then I realized that changing the type of the variable 'micros' from
uint64_t to std::time_t on that same function, could solve the problem.

I just want to know if that's a known issue and if applying that small fix
other issues may appear.

Thanks in advance
Bruno



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net