diff --git a/src/read_resume_data.cpp b/src/read_resume_data.cpp index 02dedb7ac..e3c709348 100644 --- a/src/read_resume_data.cpp +++ b/src/read_resume_data.cpp @@ -121,8 +121,8 @@ namespace { ret.last_seen_complete = std::time_t(rd.dict_find_int_value("last_seen_complete")); - ret.last_download = rd.dict_find_int_value("last_download", 0); - ret.last_upload = rd.dict_find_int_value("last_upload", 0); + ret.last_download = std::time_t(rd.dict_find_int_value("last_download", 0)); + ret.last_upload = std::time_t(rd.dict_find_int_value("last_upload", 0)); // scrape data cache ret.num_complete = int(rd.dict_find_int_value("num_complete", -1)); diff --git a/src/torrent.cpp b/src/torrent.cpp index 479ca23a7..d70f46f70 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -6114,8 +6114,8 @@ bool is_downloading_state(int const st) ret.finished_time = static_cast(total_seconds(finished_time())); ret.seeding_time = static_cast(total_seconds(seeding_time())); ret.last_seen_complete = m_last_seen_complete; - ret.last_upload = total_seconds(m_last_upload.time_since_epoch()); - ret.last_download = total_seconds(m_last_download.time_since_epoch()); + ret.last_upload = std::time_t(total_seconds(m_last_upload.time_since_epoch())); + ret.last_download = std::time_t(total_seconds(m_last_download.time_since_epoch())); ret.num_complete = m_complete; ret.num_incomplete = m_incomplete;