Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e6fae9eeaf4e6f45efc031ac1ee487daa657b392
      
https://github.com/WebKit/WebKit/commit/e6fae9eeaf4e6f45efc031ac1ee487daa657b392
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-20 (Mon, 20 Apr 2026)

  Changed paths:
    M JSTests/complex.yaml
    A JSTests/complex/intl-default-timezone-backward-link.js
    A JSTests/complex/intl-default-timezone-etc-gmt-offset.js
    A JSTests/complex/intl-default-timezone-etc-unknown.js
    A JSTests/complex/intl-default-timezone-region-alias.js
    A JSTests/complex/intl-default-timezone-three-letter-alias.js
    A JSTests/complex/intl-default-timezone-utc-alias.js
    M JSTests/stress/intl-canonical-gmt.js
    A JSTests/stress/intl-canonical-iana-time-zone.js
    M JSTests/stress/intl-datetimeformat.js
    M JSTests/stress/temporal-timezone.js
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/ISO8601.h
    M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
    M Source/JavaScriptCore/runtime/IntlDateTimeFormat.h
    M Source/JavaScriptCore/runtime/IntlObject.cpp
    M Source/JavaScriptCore/runtime/IntlObject.h
    A Source/JavaScriptCore/runtime/JSCTimeZone.h
    M Source/JavaScriptCore/runtime/JSDateMath.cpp
    M Source/JavaScriptCore/runtime/JSDateMath.h
    M Source/JavaScriptCore/runtime/TemporalNow.cpp
    M Source/JavaScriptCore/runtime/TemporalTimeZone.cpp
    M Source/JavaScriptCore/runtime/TemporalTimeZone.h
    M Source/JavaScriptCore/runtime/TemporalTimeZoneConstructor.cpp
    M Source/JavaScriptCore/runtime/TemporalTimeZonePrototype.cpp

  Log Message:
  -----------
  [JSC] Introduce Canonicalized TimeZone mechanism
https://bugs.webkit.org/show_bug.cgi?id=312699
rdar://175098682

Reviewed by Sosuke Suzuki.

This patch adds canonicalized TimeZone mechanism. We add a new class
JSC::TimeZone, which holds TimeZoneID and offset. So this can represent
canonicalized TimeZone throughout JSC code.

We start using ucal_getIanaTimeZoneID (which is available from ICU 74),
which can generate primary IANA TimeZone ID instead of legacy ID
primarily used inside ICU. So,

1. Internally TimeZoneID is mapped to primary IANA IDs. So this
   represents the canonicalized ID.
2. But we still keep accepting various legacy ID correctly. And then we
   map the result to the canonicalized ID via
   intlAvailableTimeZoneIndex.

Tests: JSTests/complex/intl-default-timezone-backward-link.js
       JSTests/complex/intl-default-timezone-etc-gmt-offset.js
       JSTests/complex/intl-default-timezone-etc-unknown.js
       JSTests/complex/intl-default-timezone-posix.js
       JSTests/complex/intl-default-timezone-region-alias.js
       JSTests/complex/intl-default-timezone-three-letter-alias.js
       JSTests/complex/intl-default-timezone-utc-alias.js
       JSTests/stress/intl-canonical-iana-time-zone.js

* JSTests/complex.yaml:
* JSTests/complex/intl-default-timezone-backward-link.js: Added.
(shouldBe):
* JSTests/complex/intl-default-timezone-etc-gmt-offset.js: Added.
(shouldBe):
* JSTests/complex/intl-default-timezone-etc-unknown.js: Added.
(shouldBe):
* JSTests/complex/intl-default-timezone-region-alias.js: Added.
(shouldBe):
* JSTests/complex/intl-default-timezone-three-letter-alias.js: Added.
(shouldBe):
* JSTests/complex/intl-default-timezone-utc-alias.js: Added.
(shouldBe):
* JSTests/stress/intl-canonical-gmt.js:
* JSTests/stress/intl-canonical-iana-time-zone.js: Added.
(shouldBe):
(shouldBeTrue):
(shouldBeFalse):
(resolved):
(fmt):
* JSTests/stress/intl-datetimeformat.js:
* JSTests/stress/temporal-timezone.js:
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseTimeZoneName):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::resolvedOptions const):
(JSC::IntlDateTimeFormat::createDateIntervalFormatIfNecessary):
(JSC::availableNamedTimeZoneIdentifier): Deleted.
* Source/JavaScriptCore/runtime/IntlDateTimeFormat.h:
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::toPrimaryIanaTimeZoneIdentifier):
(JSC::intlAvailableTimeZones):
(JSC::intlTimeZoneIDToString):
(JSC::intlAvailableTimeZoneIndex):
(JSC::intlResolveTimeZoneID):
(JSC::availableNamedTimeZoneIdentifier):
(JSC::TimeZone::toString const):
(JSC::TimeZone::toICUString const):
(JSC::utcTimeZoneIDSlow):
* Source/JavaScriptCore/runtime/IntlObject.h:
(JSC::utcTimeZoneID): Deleted.
* Source/JavaScriptCore/runtime/JSCTimeZone.h: Added.
(JSC::utcTimeZoneID):
* Source/JavaScriptCore/runtime/JSDateMath.cpp:
(JSC::DateCache::defaultTimeZone):
(JSC::retrieveTimeZoneInformation):
(JSC::DateCache::timeZoneCacheSlow):
* Source/JavaScriptCore/runtime/JSDateMath.h:
* Source/JavaScriptCore/runtime/TemporalNow.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/TemporalTimeZone.cpp:
(JSC::TemporalTimeZone::create):
(JSC::TemporalTimeZone::from):
(JSC::TemporalTimeZone::createFromID): Deleted.
(JSC::TemporalTimeZone::createFromUTCOffset): Deleted.
* Source/JavaScriptCore/runtime/TemporalTimeZone.h:
* Source/JavaScriptCore/runtime/TemporalTimeZoneConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/TemporalTimeZonePrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/311604@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to