Commit 3907841a authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Aleix Pol Gonzalez
Browse files

Fix unattended update interval check

(3h).count() would return the number of hours, not seconds. We need to
convert 3 hours to seconds explicitly.

(cherry picked from commit 1a9a22f5)
parent 84d59c60
Pipeline #134784 passed with stage
in 1 minute
......@@ -33,7 +33,7 @@ void UnattendedUpdates::checkNewState()
DiscoverNotifier *notifier = static_cast<DiscoverNotifier *>(parent());
// Only allow offline updating every 3h. It should keep some peace to our users, especially on rolling distros
const QDateTime updateableTime = notifier->settings()->lastUnattendedTrigger().addSecs((3h).count());
const QDateTime updateableTime = notifier->settings()->lastUnattendedTrigger().addSecs(std::chrono::seconds(3h).count());
if (updateableTime > QDateTime::currentDateTimeUtc()) {
qDebug() << "skipping update, already updated on" << notifier->settings()->lastUnattendedTrigger().toString();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment