forked from len0rd/rockbox
Make parsing the server date locale independent also for asctime and RFC850 representation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24302 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8363619e66
commit
f18b9d9d78
1 changed files with 2 additions and 2 deletions
|
|
@ -375,10 +375,10 @@ void HttpGet::httpFinished(int id, bool error)
|
||||||
// distinguish input formats (see RFC1945)
|
// distinguish input formats (see RFC1945)
|
||||||
// RFC 850
|
// RFC 850
|
||||||
if(date.contains("-"))
|
if(date.contains("-"))
|
||||||
m_serverTimestamp = QDateTime::fromString(date, "dd-MMM-yy hh:mm:ss");
|
m_serverTimestamp = QLocale::c().toDateTime(date, "dd-MMM-yy hh:mm:ss");
|
||||||
// asctime format
|
// asctime format
|
||||||
else if(date.at(0).isLetter())
|
else if(date.at(0).isLetter())
|
||||||
m_serverTimestamp = QDateTime::fromString(date, "MMM d hh:mm:ss yyyy");
|
m_serverTimestamp = QLocale::c().toDateTime(date, "MMM d hh:mm:ss yyyy");
|
||||||
// RFC 822
|
// RFC 822
|
||||||
else
|
else
|
||||||
m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");
|
m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue