Fix from_time_t Y2K38 bug on LLP64 platforms

This commit is contained in:
Owen Rudge
2018-04-19 14:27:16 +01:00
committed by Jim King
parent a20a5c8b7c
commit 64fe6586fe
@@ -26,7 +26,7 @@ namespace posix_time {
inline
ptime from_time_t(std::time_t t)
{
return ptime(gregorian::date(1970,1,1)) + seconds(static_cast<long>(t));
return ptime(gregorian::date(1970,1,1)) + seconds(t);
}
//! Function that converts a ptime into a time_t