Add date to be considered in etag
@@ -1814,11 +1814,11 @@ QVariantMap DeRestPluginPrivate::errorToMap(int id, const QString &ressource, co
*/
void DeRestPluginPrivate::updateEtag(QString &etag)
{
- QTime time = QTime::currentTime();
+ QDateTime time = QDateTime::currentDateTime();
#if QT_VERSION < 0x050000
- etag = QString(QCryptographicHash::hash(time.toString("hh:mm:ss.zzz").toAscii(), QCryptographicHash::Md5).toHex());
+ etag = QString(QCryptographicHash::hash(time.toString("yyyy-MM-ddThh:mm:ss.zzz").toAscii(), QCryptographicHash::Md5).toHex());
#else
- etag = QString(QCryptographicHash::hash(time.toString("hh:mm:ss.zzz").toLatin1(), QCryptographicHash::Md5).toHex());
+ etag = QString(QCryptographicHash::hash(time.toString("yyyy-MM-ddThh:mm:ss.zzz").toLatin1(), QCryptographicHash::Md5).toHex());
#endif
// quotes are mandatory as described in w3 spec
etag.prepend('"');
