From a88316e1ad8d07ecb99843b4611e6e14a5843b7d Mon Sep 17 00:00:00 2001 From: Thomas Witt Date: Sat, 30 Mar 2024 16:18:26 +0100 Subject: [PATCH] UserStatusDialog.cpp: Fix timezone This test fails on the day before a timezone switch: Actual (model.clearAtDisplayString()): "23 hours" Expected (tr("1 day")) : "1 day" Setting the timezone to UTC remedies this problem. Signed-off-by: Thomas Witt --- test/testsetuserstatusdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testsetuserstatusdialog.cpp b/test/testsetuserstatusdialog.cpp index 0352216234f99..49487fccc15c4 100644 --- a/test/testsetuserstatusdialog.cpp +++ b/test/testsetuserstatusdialog.cpp @@ -187,7 +187,7 @@ class TestSetUserStatusDialog : public QObject private slots: void testCtor_fetchStatusAndPredefinedStatuses() { - const QDateTime currentDateTime(QDateTime::currentDateTime()); + const QDateTime currentDateTime(QDateTime::currentDateTimeUtc()); const QString userStatusId("fake-id"); const QString userStatusMessage("Some status");