954
954
</dl >
955
955
<emu-alg >
956
956
1. If _options_ is not present, set _options_ to *undefined* .
957
- 1. Let _offsetBehaviour_ be ~option~ .
957
+ 1. Let _hasUTCDesignator_ be *false* .
958
958
1. Let _matchBehaviour_ be ~match-exactly~ .
959
959
1. If _item_ is an Object, then
960
960
1. If _item_ has an [[InitializedTemporalZonedDateTime]] internal slot, then
968
968
1. Let _fields_ be ? PrepareCalendarFields(_calendar_ , _item_ , « ~year~ , ~month~ , ~month-code~ , ~day~ », « ~hour~ , ~minute~ , ~second~ , ~millisecond~ , ~microsecond~ , ~nanosecond~ , ~offset~ , ~time-zone~ », « ~time-zone~ »).
969
969
1. Let _timeZone_ be _fields_ .[[TimeZone]].
970
970
1. Let _offsetString_ be _fields_ .[[OffsetString]].
971
- 1. If _offsetString_ is ~unset~ , then
972
- 1. Set _offsetBehaviour_ to ~wall~ .
973
971
1. Let _resolvedOptions_ be ? GetOptionsObject(_options_ ).
974
972
1. Let _disambiguation_ be ? GetTemporalDisambiguationOption(_resolvedOptions_ ).
975
973
1. Let _offsetOption_ be ? GetTemporalOffsetOption(_resolvedOptions_ , ~reject~ ).
985
983
1. Let _timeZone_ be ? ToTemporalTimeZoneIdentifier(_annotation_ ).
986
984
1. Let _offsetString_ be _result_ .[[TimeZone]].[[OffsetString]].
987
985
1. If _result_ .[[TimeZone]].[[Z]] is *true* , then
988
- 1. Set _offsetBehaviour_ to ~exact~ .
989
- 1. Else if _offsetString_ is ~empty~ , then
990
- 1. Set _offsetBehaviour_ to ~wall~ .
986
+ 1. Set _hasUTCDesignator_ to *true* .
991
987
1. Let _calendar_ be _result_ .[[Calendar]].
992
988
1. If _calendar_ is ~empty~ , set _calendar_ to *"iso8601"* .
993
989
1. Set _calendar_ to ? CanonicalizeCalendar(_calendar_ ).
@@ -1002,6 +998,12 @@ <h1>
1002
998
1. Perform ? GetTemporalOverflowOption(_resolvedOptions_ ).
1003
999
1. Let _isoDate_ be CreateISODateRecord(_result_ .[[Year]], _result_ .[[Month]], _result_ .[[Day]]).
1004
1000
1. Let _time_ be _result_ .[[Time]].
1001
+ 1. If _hasUTCDesignator_ is *true* , then
1002
+ 1. Let _offsetBehaviour_ be ~exact~ .
1003
+ 1. Else if _offsetString_ is ~empty~ or _offsetString_ is ~unset~ , then
1004
+ 1. Let _offsetBehaviour_ be ~wall~ .
1005
+ 1. Else,
1006
+ 1. Let _offsetBehaviour_ be ~option~ .
1005
1007
1. Let _offsetNanoseconds_ be 0.
1006
1008
1. If _offsetBehaviour_ is ~option~ , then
1007
1009
1. Set _offsetNanoseconds_ to ! ParseDateTimeUTCOffset(_offsetString_ ).
0 commit comments