diff options
| author | Silarn <jrim@rimpo.org> | 2019-02-16 18:38:55 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-02-18 21:31:22 -0600 |
| commit | d2120a9c555b3f446dea44e91ac29e128a242c1b (patch) | |
| tree | d0f600ceb7be135f90a42c8c1277959a8d454b4f /src | |
| parent | 70a9cf9429ba5f782400d215a61de0e3e35116e0 (diff) | |
Extend the update date back one hour to help prevent time mismatches
- Server time and local time may not align perfectly for bulk API
Diffstat (limited to 'src')
| -rw-r--r-- | src/modinfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 938a6418..4d30d770 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -335,7 +335,7 @@ std::set<QSharedPointer<ModInfo>> ModInfo::filteredMods(QString gameName, QVaria QVariantMap update = result.toMap(); std::copy_if(s_Collection.begin(), s_Collection.end(), std::inserter(finalMods, finalMods.end()), [=](QSharedPointer<ModInfo> info) -> bool { if (info->getNexusID() == update["mod_id"].toInt() && info->getGameName().compare(gameName, Qt::CaseInsensitive) == 0) - if (info->getLastNexusUpdate() > QDateTime::fromSecsSinceEpoch(update["latest_file_update"].toInt(), Qt::UTC)) + if (info->getLastNexusUpdate().addSecs(-3600) > QDateTime::fromSecsSinceEpoch(update["latest_file_update"].toInt(), Qt::UTC)) return true; return false; }); |
