diff --git a/src/objects/js-temporal-objects.cc b/src/objects/js-temporal-objects.cc index 120547e2e8..3d4777b277 100644 --- a/src/objects/js-temporal-objects.cc +++ b/src/objects/js-temporal-objects.cc @@ -11241,21 +11241,27 @@ MaybeHandle JSTemporalTimeZone::GetPossibleInstantsFor( // dateTime.[[ISONanosecond]]). Handle epoch_nanoseconds = GetEpochFromISOParts(isolate, date_time_record); + // b. Let possibleEpochNanoseconds be « epochNanoseconds - + // ℤ(timeZone.[[OffsetNanoseconds]]) ». + epoch_nanoseconds = + BigInt::Subtract( + isolate, epoch_nanoseconds, + BigInt::FromInt64(isolate, time_zone->offset_nanoseconds())) + .ToHandleChecked(); + + // The following is the step 7 and 8 for the case of step 4 under the if + // block. + // a. If ! IsValidEpochNanoseconds(epochNanoseconds) is false, throw a // RangeError exception. if (!IsValidEpochNanoseconds(isolate, epoch_nanoseconds)) { THROW_NEW_ERROR(isolate, NEW_TEMPORAL_INVALID_ARG_RANGE_ERROR(), JSArray); } - // b. Let instant be ! CreateTemporalInstant(epochNanoseconds − - // timeZone.[[OffsetNanoseconds]]). + // b. Let instant be ! CreateTemporalInstant(epochNanoseconds). + Handle instant = - temporal::CreateTemporalInstant( - isolate, - BigInt::Subtract( - isolate, epoch_nanoseconds, - BigInt::FromInt64(isolate, time_zone->offset_nanoseconds())) - .ToHandleChecked()) + temporal::CreateTemporalInstant(isolate, epoch_nanoseconds) .ToHandleChecked(); // c. Return ! CreateArrayFromList(« instant »). Handle fixed_array = factory->NewFixedArray(1); diff --git a/test/test262/test262.status b/test/test262/test262.status index e761a061a2..d0bd12edd2 100644 --- a/test/test262/test262.status +++ b/test/test262/test262.status @@ -681,7 +681,6 @@ 'built-ins/Temporal/Duration/prototype/total/relativeto-zoneddatetime-with-fractional-days': [FAIL], 'built-ins/Temporal/PlainTime/prototype/add/argument-string-duration-too-large': [FAIL], 'built-ins/Temporal/PlainTime/prototype/subtract/argument-string-duration-too-large': [FAIL], - 'built-ins/Temporal/TimeZone/prototype/getPossibleInstantsFor/fixed-offset-near-date-time-limits': [FAIL], 'intl402/Temporal/TimeZone/prototype/getNextTransition/subtract-second-and-nanosecond-from-last-transition': [FAIL], 'intl402/Temporal/TimeZone/prototype/getPreviousTransition/nanoseconds-subtracted-or-added-at-dst-transition': [FAIL],