mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibTimeZone+Userland: Include Link entries when returning all time zones
We currently only return primary time zones, i.e. time zones that are not a Link. LibJS will require knowledge of Link entries, and whether each entry is or is not a Link.
This commit is contained in:
parent
ddaba88340
commit
0bc401a1d6
6 changed files with 63 additions and 9 deletions
|
@ -87,10 +87,10 @@ static Vector<StringView> available_canonical_time_zones()
|
|||
Vector<StringView> result;
|
||||
|
||||
// 3. For each element name of names, do
|
||||
for (auto name : names) {
|
||||
for (auto const& name : names) {
|
||||
// a. Assert: IsValidTimeZoneName( name ) is true.
|
||||
// b. Let canonical be ! CanonicalizeTimeZoneName( name ).
|
||||
auto canonical = TimeZone::canonicalize_time_zone(name).value();
|
||||
auto canonical = TimeZone::canonicalize_time_zone(name.name).value();
|
||||
|
||||
// c. If result does not contain an element equal to canonical, then
|
||||
if (!result.contains_slow(canonical)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue