Commit 26bde067 authored by Laurent Montel's avatar Laurent Montel 😁

Optimization

parent ebe8b55e
......@@ -91,7 +91,7 @@ QString LoadFeedListCommand::Private::createBackup(const QString &path, bool *ok
{
const QString backup = path
+ QLatin1String("-backup.")
+ QString::number(QDateTime::currentDateTime().toTime_t());
+ QString::number(QDateTime::currentDateTimeUtc().toTime_t());
const bool copied = QFile::copy(path, backup);
if (ok) {
......
......@@ -530,7 +530,7 @@ void Akregator::Feed::slotAddToFetchQueue(FetchQueue *queue, bool intervalFetchO
uint lastFetch = d->archive->lastFetch();
uint now = QDateTime::currentDateTime().toTime_t();
uint now = QDateTime::currentDateTimeUtc().toTime_t();
if (interval > 0 && now - lastFetch >= (uint)interval) {
queue->addFeed(this);
......@@ -747,7 +747,7 @@ void Akregator::Feed::fetchCompleted(Syndication::Loader *l, Syndication::FeedPt
void Akregator::Feed::markAsFetchedNow()
{
if (d->archive) {
d->archive->setLastFetch(QDateTime::currentDateTime().toTime_t());
d->archive->setLastFetch(QDateTime::currentDateTimeUtc().toTime_t());
}
}
......
......@@ -64,7 +64,7 @@ uint KonsoleKalendarEpoch::QDateTime2epoch(const QDateTime &dt)
// Compute #seconds to subtract for local timezone difference from UTC.
int offset = QDateTime::currentDateTime().toUTC().toTime_t() -
QDateTime::currentDateTime().toTime_t();
QDateTime::currentDateTime().toTime_t();
return dt.toTime_t() - offset;
}
......
Markdown is supported
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