Description: qhelpgenerator: localize SOURCE_DATE_EPOCH to UTC
Origin: upstream, https://code.qt.io/cgit/qt/qttools.git/commit/?id=f11d7e4af73ca474
Last-Update: 2024-01-13

--- a/src/assistant/help/qhelpcollectionhandler.cpp
+++ b/src/assistant/help/qhelpcollectionhandler.cpp
@@ -2202,8 +2202,10 @@ bool QHelpCollectionHandler::registerInd
         const QString sourceDateEpochStr = qEnvironmentVariable("SOURCE_DATE_EPOCH");
         bool ok;
         const qlonglong sourceDateEpoch = sourceDateEpochStr.toLongLong(&ok);
-        if (ok && sourceDateEpoch < lastModified.toSecsSinceEpoch())
+        if (ok && sourceDateEpoch < lastModified.toSecsSinceEpoch()) {
+            lastModified.setOffsetFromUtc(0);
             lastModified.setSecsSinceEpoch(sourceDateEpoch);
+        }
     }
     m_query->addBindValue(lastModified.toString(Qt::ISODate));
     if (!m_query->exec())
--- a/src/assistant/qhelpgenerator/main.cpp
+++ b/src/assistant/qhelpgenerator/main.cpp
@@ -116,6 +116,7 @@ int generateCollectionFile(const QByteAr
     if (!config.filesToRegister().isEmpty()) {
         if (Q_UNLIKELY(qEnvironmentVariableIsSet("SOURCE_DATE_EPOCH"))) {
             QDateTime dt;
+            dt.setOffsetFromUtc(0);
             dt.setSecsSinceEpoch(qEnvironmentVariableIntValue("SOURCE_DATE_EPOCH"));
             CollectionConfiguration::updateLastRegisterTime(helpEngine, dt);
         } else {
