Skip to content

Commit

Permalink
Editorial: Fix type confusion in DisambiguatePossibleEpochNanoseconds
Browse files Browse the repository at this point in the history
Regression from #2925. Wrong type passed to GetOffsetNanosecondsFor; we
need the result of GetPossibleEpochNanoseconds from the preceding lines.

Closes: #3010
  • Loading branch information
ptomato committed Oct 28, 2024
1 parent 1201260 commit ecf625e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/timezone.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,12 @@ <h1>
1. Throw a *RangeError* exception.
1. Let _before_ be the latest possible ISO Date-Time Record for which CompareISODateTime(_before_, _isoDateTime_) = -1 and ! GetPossibleEpochNanoseconds(_timeZone_, _before_) is not empty.
1. Let _after_ be the earliest possible ISO Date-Time Record for which CompareISODateTime(_after_, _isoDateTime_) = 1 and ! GetPossibleEpochNanoseconds(_timeZone_, _after_) is not empty.
1. Let _offsetBefore_ be GetOffsetNanosecondsFor(_timeZone_, _before_).
1. Let _offsetAfter_ be GetOffsetNanosecondsFor(_timeZone_, _after_).
1. Let _beforePossible_ be ! GetPossibleEpochNanoseconds(_timeZone_, _before_).
1. Assert: _beforePossible_'s length is 1.
1. Let _afterPossible_ be ! GetPossibleEpochNanoseconds(_timeZone_, _after_).
1. Assert: _afterPossible_'s length is 1.
1. Let _offsetBefore_ be GetOffsetNanosecondsFor(_timeZone_, _beforePossible_[0]).
1. Let _offsetAfter_ be GetOffsetNanosecondsFor(_timeZone_, _afterPossible_[0]).
1. Let _nanoseconds_ be _offsetAfter_ - _offsetBefore_.
1. Assert: abs(_nanoseconds_) ≤ nsPerDay.
1. If _disambiguation_ is ~earlier~, then
Expand Down

0 comments on commit ecf625e

Please sign in to comment.