summaryrefslogtreecommitdiff
path: root/tests/auto/corelib/io/qfileinfo
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-01-04 16:29:39 +0200
committerThiago Macieira <thiago.macieira@intel.com>2023-01-06 17:57:52 +0000
commit26b5325767a4084ca51f485b99ac58477246e062 (patch)
tree2edcc69a6f87f9f12d33b6887b58029cc344aa43 /tests/auto/corelib/io/qfileinfo
parent905bc6293354a0d3ee832b6dd3f632a647f809f3 (diff)
downloadqtbase-26b5325767a4084ca51f485b99ac58477246e062.tar.gz
QFileInfo: use currentDateTimeUtc()
Instead of the more verbose currentDateTime(QTZ::UTC). Pick-to: 6.5 Change-Id: Ie759f4270b12fca39c458bf85c8296f5342033db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 8ddbe75809..485d5792ac 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1130,7 +1130,7 @@ void tst_QFileInfo::fileTimes()
QDateTime birthTime, writeTime, metadataChangeTime, readTime;
// --- Create file and write to it
- beforeBirth = QDateTime::currentDateTime(QTimeZone::UTC).addMSecs(-fsClockSkew);
+ beforeBirth = QDateTime::currentDateTimeUtc().addMSecs(-fsClockSkew);
{
QFile file(fileName);
QVERIFY(file.open(QFile::WriteOnly | QFile::Text));
@@ -1140,7 +1140,7 @@ void tst_QFileInfo::fileTimes()
datePairString(birthTime, beforeBirth));
QTest::qSleep(sleepTime);
- beforeWrite = QDateTime::currentDateTime().addMSecs(-fsClockSkew);
+ beforeWrite = QDateTime::currentDateTimeUtc().addMSecs(-fsClockSkew);
QTextStream ts(&file);
ts << fileName << Qt::endl;
}
@@ -1153,7 +1153,7 @@ void tst_QFileInfo::fileTimes()
// --- Change the file's metadata
QTest::qSleep(sleepTime);
- beforeMetadataChange = QDateTime::currentDateTime(QTimeZone::UTC).addMSecs(-fsClockSkew);
+ beforeMetadataChange = QDateTime::currentDateTimeUtc().addMSecs(-fsClockSkew);
{
QFile file(fileName);
file.setPermissions(file.permissions());
@@ -1169,7 +1169,7 @@ void tst_QFileInfo::fileTimes()
// --- Read the file
QTest::qSleep(sleepTime);
- beforeRead = QDateTime::currentDateTime(QTimeZone::UTC).addMSecs(-fsClockSkew);
+ beforeRead = QDateTime::currentDateTimeUtc().addMSecs(-fsClockSkew);
{
QFile file(fileName);
QVERIFY(file.open(QFile::ReadOnly | QFile::Text));