summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
index b83d5312b1..b98dc3574e 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
@@ -524,6 +524,22 @@ Optional<Offset> get_time_zone_offset(TimeZone time_zone, AK::Time time)
return dst_offset;
}
+Span<StringView const> all_time_zones()
+{
+ static constexpr auto all_time_zones = Array {
+ )~~~");
+
+ for (auto const& time_zone : time_zone_data.time_zone_names) {
+ generator.set("time_zone", time_zone);
+ generator.append("\"@time_zone@\"sv, ");
+ }
+
+ generator.append(R"~~~(
+ };
+
+ return all_time_zones;
+}
+
}
)~~~");