mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Do not negate offset in LocalTZA for isUTC=false
In commmit 7d2834344a, I think I combined
the definitions of the LocalTZA and UTC AOs in my head, and thought the
offset should be negated within LocalTZA. Instead, the offset should be
left untouched, and the UTC AO is responsible for doing the subtraction.
This commit is contained in:
committed by
Linus Groh
parent
d93713b874
commit
b2aa3c9f84
@@ -106,7 +106,7 @@ static Value parse_simplified_iso8601(GlobalObject& global_object, const String&
|
||||
// https://tc39.es/ecma262/#sec-date.parse:
|
||||
// "When the UTC offset representation is absent, date-only forms are interpreted as a UTC time and date-time forms are interpreted as a local time."
|
||||
if (!timezone.has_value() && hours.has_value())
|
||||
time_ms += local_tza(time_ms, false);
|
||||
time_ms = utc_time(time_ms);
|
||||
|
||||
if (timezone == '-')
|
||||
time_ms += *timezone_hours * 3'600'000 + *timezone_minutes * 60'000;
|
||||
|
||||
Reference in New Issue
Block a user