Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / date_time / c_local_time_adjustor.hpp
index f802582..aa56312 100644 (file)
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
+ * $Date$
  */
 
 /*! @file c_local_time_adjustor.hpp
@@ -42,7 +42,10 @@ namespace date_time {
       }
       date_duration_type dd = t.date() - time_t_start_day;
       time_duration_type td = t.time_of_day();
-      std::time_t t2 = dd.days()*86400 + td.hours()*3600 + td.minutes()*60 + td.seconds();
+      std::time_t t2 = static_cast<std::time_t>(dd.days())*86400 +
+                       static_cast<std::time_t>(td.hours())*3600 +
+                       static_cast<std::time_t>(td.minutes())*60 +
+                       td.seconds();
       std::tm tms, *tms_ptr;
       tms_ptr = c_time::localtime(&t2, &tms);
       date_type d(static_cast<unsigned short>(tms_ptr->tm_year + 1900),