Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion JSTests/BUN-TEST-DIFFERENCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Not upstream's: a sync neither brings nor changes them. Most are named `stress/b
| `stress/regexp-image-code-hands-long-searches-over.js` | with `--useRegExpImageMode=1`, in a `jsc` that has the ahead-of-time compiler: the code of a pattern stops after nine turns a unit and 65,537, and the match is made again by the flat programs, which give it up where the JIT does. In a `jsc` without the compiler the option changes nothing, and both runs hold the JIT to the same answers |
| `stress/switch-string-substring-of-base-widened-by-atomization.js` | a `switch` over strings that reads the characters of a substring in place, in its base, goes by the width that the base has now: atomizing the base may have put an equal 16-bit string in its place since the substring was made (DFG and FTL) |
| `stress/bun-weak-map-and-set-shrunk-before-eden-collection.js` | the buffer of a `WeakMap` or `WeakSet` counts in the heap's size as it is behind a collection (`WeakMapImpl::reconcileWeakReferencesAtGCEnd`; upstream counts it as the last visit found it), but an eden collection never leaves that size below what the collection before it left: a buffer that shrank stops counting at the next full collection |
| `stress/intl-timezone-posix-style.js` | `EST5EDT`, `CST6CDT`, `MST7MDT` and `PST8PDT` stay aliases of their `America/*` zones (tc39/ecma402#1103) on every ICU, including those where CLDR treats them as canonical zones (45 and earlier, 49 and later): accepted, kept as written, not in `supportedValuesOf`, same offsets and names as the primary zone, and resolved to it when they are the host's zone |
| `stress/intl-timezone-posix-style.js` | `EST5EDT`, `CST6CDT`, `MST7MDT` and `PST8PDT` stay aliases of their `America/*` zones (tc39/ecma402#1103) on every ICU, including those where CLDR treats them as canonical zones (45 and earlier, 49 and later): accepted, kept as written, not in `supportedValuesOf`, same offsets and names as the primary zone, and resolved to it when they are the host's zone. `CET`, `EET`, `MET` and `WET` are aliases of `Europe/Brussels`, `Europe/Athens`, `Europe/Brussels` and `Europe/Lisbon` in the same way: tzdata before 2024b has them as zones, and the system ICU of a Mac can have such data |
| `stress/temporal-calendar-gregory-near-min-date.js` | the `gregory` calendar agrees with the ISO calendar in the first years of Temporal's range: reading fields, building from fields and formatting (`prolepticGregorianChangeDate`, `runtime/JSDateMath.h`) |
| the fr-CA block of `stress/intl-date-pattern-includes-literal-text.js` (the file is upstream's) | keeps the file's coverage on CLDR 49, where fr's pattern no longer has literal text: an `h` inside literal text is not mistaken for the hour field |
| the last block of `stress/regexp-test-sticky-first-char-filter.js` (the file is upstream's; nothing of upstream's text changes) | the first-character filter of a sticky `test()` comes from the first sets of the alternatives (`yarr/YarrFirstFollowSets.*`): behind a leading lookbehind, forward reference or lookahead, and in groups nested more than eight deep, a byte that passes the filter still reaches the matcher |
Expand Down
5 changes: 5 additions & 0 deletions JSTests/stress/intl-timezone-posix-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ const links = [
["CST6CDT", "America/Chicago", 300],
["MST7MDT", "America/Denver", 360],
["PST8PDT", "America/Los_Angeles", 420],
// Not part of that issue: tzdata before 2024b has these as zones too, and they are links from 2024b on.
["CET", "Europe/Brussels", -120],
["EET", "Europe/Athens", -180],
["MET", "Europe/Brussels", -120],
["WET", "Europe/Lisbon", -60],
];

const supported = Intl.supportedValuesOf("timeZone");
Expand Down
8 changes: 8 additions & 0 deletions Source/JavaScriptCore/runtime/IntlObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,14 @@ static std::optional<ASCIILiteral> mapPOSIXStyleTimeZoneToPrimary(StringView tim
return "America/Denver"_s;
if (timeZone == "PST8PDT"_s)
return "America/Los_Angeles"_s;
// Not part of that issue: tzdata before 2024b has these four as zones too, and links them to these zones from
// 2024b on. The system ICU of a Mac can have the older data (macOS 15.7.7 has tzdata 2024a).
if (timeZone == "CET"_s || timeZone == "MET"_s)
return "Europe/Brussels"_s;
if (timeZone == "EET"_s)
return "Europe/Athens"_s;
if (timeZone == "WET"_s)
return "Europe/Lisbon"_s;
Comment thread
robobun marked this conversation as resolved.
Resolved
return std::nullopt;
}

Expand Down
Loading