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

Unified Diff: src/dateparser-inl.h

Issue 1229903004: Make dates default to the local timezone if none specified (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test Created 5 years, 5 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/date.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 f7360f8c0231cc168a1c6cd64f3f1f355e9d97aa..f22e5de7974ae843fd9e45df464e7adf51883570 100644
--- a/src/dateparser-inl.h
+++ b/src/dateparser-inl.h
@@ -39,8 +39,8 @@ bool DateParser::Parse(Vector<Char> str,
// sss is in the range 000..999,
// hh is in the range 00..23,
// mm, ss, and sss default to 00 if missing, and
- // timezone defaults to Z if missing
- // (following Safari, ISO actually demands local time).
+ // timezone defaults to local time if missing
+ // (following the ES6 standard vs. ES5).
ulan 2015/07/24 13:56:25 We can now drop the part in parenthesis.
hichris123 2015/07/24 15:10:04 Done.
// Extensions:
// We also allow sss to have more or less than three digits (but at
// least one).
@@ -299,8 +299,7 @@ DateParser::DateToken DateParser::ParseES5DateTime(
}
if (!scanner->Peek().IsEndOfInput()) return DateToken::Invalid();
}
- // Successfully parsed ES5 Date Time String. Default to UTC if no TZ given.
- if (tz->IsEmpty()) tz->Set(0);
+ // Successfully parsed ES5 Date Time String.
day->set_iso_date();
return DateToken::EndOfInput();
}
« no previous file with comments | « no previous file | test/mjsunit/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698