summaryrefslogtreecommitdiff
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
parentb5c2576651bd43e0f685ec278bd85d9c012e6ad9 (diff)
downloadrockbox-1789b717bab157a03ed5fcf448df035c59729cf7.tar.gz
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
-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)
361 date.remove(0, date.indexOf(" ") + 1); 361 date.remove(0, date.indexOf(" ") + 1);
362 if(date.endsWith("GMT")) date.truncate(date.indexOf(" GMT")); 362 if(date.endsWith("GMT")) date.truncate(date.indexOf(" GMT"));
363 // distinguish input formats (see RFC1945) 363 // distinguish input formats (see RFC1945)
364 if(date.contains("-")) // RFC 850 364 if(date.at(0).isLetter()) // asctime format
365 m_serverTimestamp = QLocale::c().toDateTime(date, "dd-MMM-yy hh:mm:ss");
366 else if(date.at(0).isLetter()) // asctime format
367 m_serverTimestamp = QLocale::c().toDateTime(date, "MMM d hh:mm:ss yyyy"); 365 m_serverTimestamp = QLocale::c().toDateTime(date, "MMM d hh:mm:ss yyyy");
368 else // RFC 822 366 else // RFC 822
369 m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss"); 367 m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");