Ticket #8450: c_local_time_adjustor.hpp.patch

File c_local_time_adjustor.hpp.patch, 753 bytes (added by raad@…, 10 years ago)

Patch that fixes the problem

  • c_local_time_adjustor.hpp

     
    4242      }
    4343      date_duration_type dd = t.date() - time_t_start_day;
    4444      time_duration_type td = t.time_of_day();
    45       std::time_t t2 = dd.days()*86400 + td.hours()*3600 + td.minutes()*60 + td.seconds();
     45      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();
    4646      std::tm tms, *tms_ptr;
    4747      tms_ptr = c_time::localtime(&t2, &tms);
    4848      date_type d(static_cast<unsigned short>(tms_ptr->tm_year + 1900),