1
0
Fork 0
forked from len0rd/rockbox

Use QLocale::toDateTime() for parsing the date instead of QDateTime::fromString(). Fixes server timestamps not parsed correctly on systems with a non-english locale.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24017 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2009-12-15 21:58:07 +00:00
parent 8fd23aafa0
commit b283967ebd

View file

@ -381,7 +381,7 @@ void HttpGet::httpFinished(int id, bool error)
m_serverTimestamp = QDateTime::fromString(date, "MMM d hh:mm:ss yyyy");
// RFC 822
else
m_serverTimestamp = QDateTime::fromString(date, "dd MMM yyyy hh:mm:ss");
m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");
qDebug() << "[HTTP] HEAD finished, server date:" << date << ", parsed:" << m_serverTimestamp;
emit headerFinished();
return;