diff --git a/spec.html b/spec.html index c28b5d38b4..ccc0f701ca 100644 --- a/spec.html +++ b/spec.html @@ -26762,19 +26762,16 @@

Week Day

-

Local Time Zone Adjustment

-

An implementation of ECMAScript is expected to determine the local time zone adjustment. The local time zone adjustment is a value LocalTZA measured in milliseconds which when added to UTC represents the local standard time. Daylight saving time is not reflected by LocalTZA.

- -

It is recommended that implementations use the time zone information of the IANA Time Zone Database https://www.iana.org/time-zones/.

-
-
- - - -

Daylight Saving Time Adjustment

-

An implementation-dependent algorithm using best available information on time zones to determine the local daylight saving time adjustment DaylightSavingTA(_t_), measured in milliseconds. An implementation of ECMAScript is expected to make its best effort to determine the local daylight saving time adjustment.

+

LocalTimeZoneAdjustment ( _t_, _isUTC_ )

+

LocalTimeZoneAdjustment( _t_, _isUTC_ ) is an implementation-defined algorthm that must return a number representing milliseconds suitable for adding to a Time Value. The local political rules for standard time and daylight saving time in effect at _t_ should be used to determine the result in the way specified in the following three paragraphs.

+

When _isUTC_ is true, LocalTZA( _t_, true ) should return the offset of the local time zone from UTC measured in milliseconds at time represented by time value _t_ (UTC). When the result is added to _t_ (UTC), it should yield the local time.

+

When _isUTC_ is false, LocalTZA( _t_, false ) should return the offset of the local time zone from UTC measured in milliseconds at local time represented by time value _t_local = _t_. When the result is subtracted from the local time _t_local, it should yield the corresponding UTC.

+

When _t_local represents local time repeating multiple times at a negative time zone transition (e.g. when the daylight saving time ends or the time zone adjustment is decreased due to a time zone rule change) or skipped local time at a positive time zone transitions (e.g. when the daylight saving time starts or the time zone adjustment is increased due to a time zone rule change), _t_local must be interpreted with the time zone adjustment before the transition.

+

If an implementation does not support a conversion described above or if political rules for time _t_ are not available within the implementation, the result must be 0.

It is recommended that implementations use the time zone information of the IANA Time Zone Database https://www.iana.org/time-zones/.

+

1:30 AM on November 5, 2017 in America/New_York is repeated twice (fall backward), but it must be interpreted as 1:30 AM UTC-04 instead of 1:30 AM UTC-05. LocalTZA(TimeClip(MakeDate(MakeDay(2017, 10, 5), MakeTime(1, 30, 0, 0))), false) is -4 × msPerHour.

+

2:30 AM on March 12, 2017 in America/New_York does not exist, but it must be interpreted as 2:30 AM UTC-05 (equivalent to 3:30 AM UTC-04). LocalTZA(TimeClip(MakeDate(MakeDay(2017, 2, 12), MakeTime(2, 30, 0, 0))), false) is -5 × msPerHour.

.
@@ -26783,8 +26780,11 @@

Daylight Saving Time Adjustment

LocalTime ( _t_ )

The abstract operation LocalTime with argument _t_ converts _t_ from UTC to local time by performing the following steps:

- 1. Return _t_ + LocalTZA + DaylightSavingTA(_t_). + 1. Return _t_ + LocalTZA(_t_, true). + +

Two different time values (_t_ (UTC)) are converted to the same local time tlocal at a negative time zone transition when there are repeated times (e.g. the daylight saving time ends or the time zone adjustment is decreased.).

+
@@ -26792,10 +26792,10 @@

LocalTime ( _t_ )

UTC ( _t_ )

The abstract operation UTC with argument _t_ converts _t_ from local time to UTC. It performs the following steps:

- 1. Return _t_ - LocalTZA - DaylightSavingTA(_t_ - LocalTZA). + 1. Return _t_ - LocalTZA( _t_ , false) -

UTC(LocalTime(_t_)) is not necessarily always equal to _t_.

+

UTC(LocalTime(_t_)) is not necessarily always equal to _t_. LocalTime(UTC(_t_local)) is not necessarily always equal to _t_local, either.

@@ -27967,7 +27967,7 @@

Runtime Semantics: TimeZoneString( _tv_ )

1. Assert: Type(_tv_) is Number. 1. Assert: _tv_ is not *NaN*. - 1. Let _offset_ be LocalTZA + DaylightSavingTA(_tv_). + 1. Let _offset_ be LocalTZA(_tv_, true). 1. If _offset_ ≥ 0, let _offsetSign_ be `"+"`; otherwise, let _offsetSign_ be `"-"`. 1. Let _offsetMin_ be the String representation of MinFromTime(abs(_offset_)), formatted as a two-digit number, padded to the left with a zero if necessary. 1. Let _offsetHour_ be the String representation of HourFromTime(abs(_offset_)), formatted as a two-digit number, padded to the left with a zero if necessary.