diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-12-15 21:58:07 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-12-15 21:58:07 +0000 |
commit | b283967ebd30f7828b75df3c973f4d01885a49f8 (patch) | |
tree | ea18b80758d3f984849454dc9f096a809c3c3155 /rbutil/rbutilqt/base/httpget.cpp | |
parent | 8fd23aafa0482ccf600e4f8d6cda05834b7d0cc4 (diff) |
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.cpp | 2 |
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) 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; |