1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
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 {
|