From kde-commits Sat Sep 30 20:31:37 2006 From: Harri Porten Date: Sat, 30 Sep 2006 20:31:37 +0000 To: kde-commits Subject: KDE/kdelibs/kjs Message-Id: <1159648297.696285.30793.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=115964830526726 SVN commit 590784 by porten: don't call strtol() on a string starting with a colon. don't understand why the parsing seems to have worked in 3.x. again several Date.js regressions in trunk less M +4 -2 date_object.cpp --- trunk/KDE/kdelibs/kjs/date_object.cpp #590783:590784 @@ -1108,7 +1108,7 @@ hour = strtol(dateString, &newPosStr, 10); // Do not check for errno here since we want to continue - // even if errno was set becasue we are still looking + // even if errno was set because we are still looking // for the timezone! // Read a number? If not, this might be a timezone name. @@ -1176,7 +1176,8 @@ // Don't fail if the time zone is missing. // Some websites omit the time zone (4275206). if (*dateString) { - if (strncasecmp(dateString, "GMT", 3) == 0 || strncasecmp(dateString, "UTC", 3) == 0) { + if (strncasecmp(dateString, "GMT", 3) == 0 || + strncasecmp(dateString, "UTC", 3) == 0) { dateString += 3; haveTZ = true; } @@ -1195,6 +1196,7 @@ if (*dateString != ':') { offset = ((o / 100) * 60 + (o % 100)) * sgn; } else { // GMT+05:00 + dateString++; long o2 = strtol(dateString, &newPosStr, 10); if (errno) return NaN;