Bug 682754 - date_parseISOString should tolerate a missing colon in the timezone, arr=Waldo

This commit is contained in:
Phil Ringnalda
2011-08-28 23:16:37 -07:00
parent 01cecfafe7
commit 0e1309b701
3 changed files with 98 additions and 1 deletions

View File

@@ -847,7 +847,12 @@ date_parseISOString(JSLinearString *str, jsdouble *result, JSContext *cx)
tzMul = -1;
++i;
NEED_NDIGITS(2, tzHour);
NEED(':');
/*
* Non-standard extension to the ISO date format (permitted by ES5):
* allow "-0700" as a time zone offset, not just "-07:00".
*/
if (PEEK(':'))
++i;
NEED_NDIGITS(2, tzMin);
} else {
isLocalTime = JS_TRUE;