id summary reporter owner description type status milestone component version severity resolution keywords cc 2809 [patch] Date Time exception with MinGW Claudio Bley az_sw_dude "Hi. I'm using Boost version 1.38 under Windows using MinGW. When trying to use the this_thread::sleep function I got the following exception: ""could not convert calendar time to UTC time"" During compilation I received the following compiler warning: {{{ ../../../../boost/date_time/filetime_functions.hpp: In function `uint64_t boost::date_time::winapi::file_time_to_microseconds(const FileTimeT&)': ../../../../boost/date_time/filetime_functions.hpp:101: warning: left shift count >= width of type }}} regarding the following code: {{{ #!cpp const uint64_t c1 = 27111902UL; const uint64_t c2 = 3577643008UL; const uint64_t shift = (c1 << (32)) + c2; // issues warning without 'UL' }}} It seems GCC over-optimizes this case as it replaces the variables with the corresponding literal values. Since 27111902UL is just an '''unsigned long''' (not an '''unsigned long long''') it is only 32 bit wide (on my machine) -- leading to the compiler warning above. To fix this issue, the literals need to be written using the ULL suffix or the suggested patch (attached) needs to be applied. Regards, Claudio" Bugs closed Boost 1.39.0 date_time Boost 1.38.0 Problem fixed