summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/httpget.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-01-22 22:27:16 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-01-22 22:27:16 +0100
commit1789b717bab157a03ed5fcf448df035c59729cf7 (patch)
tree42f696d0429b5ad427f8b77ad575ebfe698758d3 /rbutil/rbutilqt/base/httpget.cpp
parentb5c2576651bd43e0f685ec278bd85d9c012e6ad9 (diff)
downloadrockbox-1789b717bab157a03ed5fcf448df035c59729cf7.tar.gz
rockbox-1789b717bab157a03ed5fcf448df035c59729cf7.tar.bz2
rockbox-1789b717bab157a03ed5fcf448df035c59729cf7.zip
Remove support for RFC850 timestamps.
RFC850 timeformat isn't y2k compliant. Furthermore, parsing turned out to be broken and it doesn't seem supporting the format is necessary anyway. Change-Id: I062e636a9e016ff1ac49d2a55f00adb1af182576
Diffstat (limited to 'rbutil/rbutilqt/base/httpget.cpp')
-rw-r--r--rbutil/rbutilqt/base/httpget.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp
index 58f6bd5e09..8005d4848b 100644
--- a/rbutil/rbutilqt/base/httpget.cpp
+++ b/rbutil/rbutilqt/base/httpget.cpp
@@ -361,9 +361,7 @@ void HttpGet::httpFinished(int id, bool error)
date.remove(0, date.indexOf(" ") + 1);
if(date.endsWith("GMT")) date.truncate(date.indexOf(" GMT"));
// distinguish input formats (see RFC1945)
- if(date.contains("-")) // RFC 850
- m_serverTimestamp = QLocale::c().toDateTime(date, "dd-MMM-yy hh:mm:ss");
- else if(date.at(0).isLetter()) // asctime format
+ if(date.at(0).isLetter()) // asctime format
m_serverTimestamp = QLocale::c().toDateTime(date, "MMM d hh:mm:ss yyyy");
else // RFC 822
m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");