Hi Kai!
On Thu, Oct 15, 2020 at 07:48:49AM +0200, Kai Pastor, DG0YT wrote:
> This patch fixes the creation of the offending timestamp, by clamping to
> SOURCE_DATE_EPOCH as specified.
Thank you for the patch and sorry for delayed response!
> I also left a link to this Debian bug in Qt's code review for the offending
> change.
Can you please share a link to the mentioned code review?
https://bugreports.qt.io/browse/QTBUG-62697 has only some old reviews from
2018 linked.
> Clamp registered collection time-stamp to SOURCE_DATE_EPOCH if set.
> --- a/src/assistant/help/qhelpcollectionhandler.cpp
> +++ b/src/assistant/help/qhelpcollectionhandler.cpp
> @@ -2197,7 +2197,14 @@
> m_query->addBindValue(fileName);
> const QFileInfo fi(absoluteDocPath(fileName));
> m_query->addBindValue(fi.size());
> - m_query->addBindValue(fi.lastModified().toString(Qt::ISODate));
> + QDateTime last_modified = fi.lastModified();
> + if (qEnvironmentVariableIsSet("SOURCE_DATE_EPOCH"))
> + {
> + qint64 source_date_epoch = qEnvironmentVariableIntValue("SOURCE_DATE_EPOCH");
> + if (source_date_epoch < last_modified.toSecsSinceEpoch())
> + last_modified.setSecsSinceEpoch(qEnvironmentVariableIntValue("SOURCE_DATE_EPOCH"));
I think we can use setSecsSinceEpoch(source_date_epoch) here?
--
Dmitry Shachnev
Attachment:
signature.asc
Description: PGP signature