Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-09-25 12:49:11 +0300
committerOlivier Goffart <olivier@woboq.com>2017-09-26 17:14:17 +0300
commit13e0cc6b501335c4cda9902905f503483237a46a (patch)
tree66ef6178dc05d0d7280ef0221f394a7ee8d2bfa5 /test/syncenginetestutils.h
parent7af81f76657aa9aed7b3942484f925b9ac9c2574 (diff)
Use QDateTime::currentDateTimeUtc instead of the non utc version
QDateTime::currentDateTime is terribly slow.
Diffstat (limited to 'test/syncenginetestutils.h')
-rw-r--r--test/syncenginetestutils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h
index cabac73bf..9253b6285 100644
--- a/test/syncenginetestutils.h
+++ b/test/syncenginetestutils.h
@@ -41,7 +41,7 @@ inline QString getFilePathFromUrl(const QUrl &url) {
inline QString generateEtag() {
- return QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch(), 16);
+ return QString::number(QDateTime::currentDateTimeUtc().toMSecsSinceEpoch(), 16);
}
inline QByteArray generateFileId() {
return QByteArray::number(qrand(), 16);
@@ -97,7 +97,7 @@ public:
file.write(buf.data(), size % buf.size());
file.close();
// Set the mtime 30 seconds in the past, for some tests that need to make sure that the mtime differs.
- OCC::FileSystem::setModTime(file.fileName(), OCC::Utility::qDateTimeToTime_t(QDateTime::currentDateTime().addSecs(-30)));
+ OCC::FileSystem::setModTime(file.fileName(), OCC::Utility::qDateTimeToTime_t(QDateTime::currentDateTimeUtc().addSecs(-30)));
QCOMPARE(file.size(), size);
}
void setContents(const QString &relativePath, char contentChar) override {