Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: src/dateparser-inl.h

Issue 12178016: Default to UTC in the legacy date parser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2521.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/dateparser-inl.h
diff --git a/src/dateparser-inl.h b/src/dateparser-inl.h
index 3cb36fa433998e96dbb9acadae999a791cc89277..4f74a088bd924ec1ea829cc06fa9aa57b48e4efb 100644
--- a/src/dateparser-inl.h
+++ b/src/dateparser-inl.h
@@ -178,7 +178,8 @@ bool DateParser::Parse(Vector<Char> str,
// Ignore other characters and whitespace.
}
}
-
+ // Successfully parsed ES5 Date Time String. Default to UTC if no TZ given.
+ if (tz.IsEmpty()) tz.Set(0);
return day.Write(out) && time.Write(out) && tz.Write(out);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2521.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698