[DateTime] overflow in posix_time::microseconds
Hello all, we encountered an overflow in posix_time::microseconds: //about 40 years (1970-2010) const __int64 n = 1267195987000000; boost::posix_time::microseconds td(n); //overflow The overflow is easy explainable since date_time::subsecond_duration first multiplies it causing the overflow and then divides by 1000000. There are already multiple posts spended on this, but I saw no definitive answer. Can someone help? Alternatively we could work around it by first divide the hour part out of it (which makes the number smaller) before adding to a ptime, but preferably we would like this to see solved in the library itself.
I created ticket: https://svn.boost.org/trac/boost/ticket/4943. It seems that there was already an old ticket: https://svn.boost.org/trac/boost/ticket/3471. Taht should have been solved in 1.43, but the observed behavior is still be present in 1.45.
participants (1)
-
gast128