From ca119ee4b440c1ebbd456417a60167e2998de4d9 Mon Sep 17 00:00:00 2001 From: Benjamin C Meyer Date: Mon, 30 Mar 2009 18:45:50 +0200 Subject: Fix the parsing of October dates. The code was looking for a 't' to detect GMT-nnnn. It should really be checking for 'gmt'. Signed-off-by: Thiago Macieira --- src/network/access/qnetworkcookie.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index fed0afc..b82d8f9 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -636,8 +636,6 @@ static QDateTime parseDateString(const QByteArray &dateString) qDebug() << "Month:" << month; #endif at += 3; - if (at < dateString.length() && dateString[at] == '-') - ++at; continue; } // Zone @@ -659,7 +657,10 @@ static QDateTime parseDateString(const QByteArray &dateString) && (at == 0 || isWhitespace(dateString[at - 1]) || dateString[at - 1] == ',' - || (dateString[at - 1] == 't'))) { + || (at >= 3 + && (dateString[at - 3] == 'g') + && (dateString[at - 2] == 'm') + && (dateString[at - 1] == 't')))) { int end = 1; while (end < 5 && dateString.length() > at+end -- cgit v0.12