| Index: src/dateparser-inl.h
|
| diff --git a/src/dateparser-inl.h b/src/dateparser-inl.h
|
| index 47a7c6e7ff1e8c8f1b574ad8478574ad80be3d49..fd4bed2df6a7071a2138012ff575960baffa8ce0 100644
|
| --- a/src/dateparser-inl.h
|
| +++ b/src/dateparser-inl.h
|
| @@ -343,8 +343,13 @@ 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.
|
| + // ES#sec-date-time-string-format Date Time String Format
|
| + // "When the time zone offset is absent, date-only forms are interpreted
|
| + // as a UTC time and date-time forms are interpreted as a local time."
|
| + if (tz->IsEmpty() && time->IsEmpty()) {
|
| + tz->Set(0);
|
| + }
|
| day->set_iso_date();
|
| return DateToken::EndOfInput();
|
| }
|
|
|