1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +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:
Timothy Flynn 2023-10-03 12:02:53 -04:00 committed by Andreas Kling
parent ddaba88340
commit 0bc401a1d6
6 changed files with 63 additions and 9 deletions

View file

@ -143,10 +143,10 @@ ErrorOr<void> change_time_zone([[maybe_unused]] StringView time_zone)
#endif
}
ReadonlySpan<StringView> __attribute__((weak)) all_time_zones()
ReadonlySpan<TimeZoneIdentifier> __attribute__((weak)) all_time_zones()
{
#if !ENABLE_TIME_ZONE_DATA
static constexpr auto utc = Array { "UTC"sv };
static constexpr auto utc = Array { TimeZoneIdentifier { "UTC"sv, IsLink::No } };
return utc;
#else
return {};