summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/httpget.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-15 21:58:07 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-15 21:58:07 +0000
commitb283967ebd30f7828b75df3c973f4d01885a49f8 (patch)
treeea18b80758d3f984849454dc9f096a809c3c3155 /rbutil/rbutilqt/base/httpget.cpp
parent8fd23aafa0482ccf600e4f8d6cda05834b7d0cc4 (diff)
downloadrockbox-b283967ebd30f7828b75df3c973f4d01885a49f8.tar.gz
rockbox-b283967ebd30f7828b75df3c973f4d01885a49f8.zip
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
Diffstat (limited to 'rbutil/rbutilqt/base/httpget.cpp')
-rw-r--r--rbutil/rbutilqt/base/httpget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp
index a412cdf7d0..05f5e87ab4 100644
--- a/rbutil/rbutilqt/base/httpget.cpp
+++ b/rbutil/rbutilqt/base/httpget.cpp
@@ -381,7 +381,7 @@ void HttpGet::httpFinished(int id, bool error)
381 m_serverTimestamp = QDateTime::fromString(date, "MMM d hh:mm:ss yyyy"); 381 m_serverTimestamp = QDateTime::fromString(date, "MMM d hh:mm:ss yyyy");
382 // RFC 822 382 // RFC 822
383 else 383 else
384 m_serverTimestamp = QDateTime::fromString(date, "dd MMM yyyy hh:mm:ss"); 384 m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");
385 qDebug() << "[HTTP] HEAD finished, server date:" << date << ", parsed:" << m_serverTimestamp; 385 qDebug() << "[HTTP] HEAD finished, server date:" << date << ", parsed:" << m_serverTimestamp;
386 emit headerFinished(); 386 emit headerFinished();
387 return; 387 return;