summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-01-19 14:54:19 -0500
committerLinus Groh <mail@linusgroh.de>2022-01-19 21:20:41 +0000
commit4400150cd2d2142ecc747f7721ae217eb3ca1cbb (patch)
tree4739e3d50f038bc9ecba3e32285f773d09f443e5 /Meta/Lagom
parentbf677eb48571fc41a9bd0161b2de633f5b9b05b2 (diff)
downloadserenity-4400150cd2d2142ecc747f7721ae217eb3ca1cbb.zip
LibJS+LibUnicode: Return the appropriate time zone name depending on DST
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp
index 3252bf0683..e3bfebfe0b 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateUnicodeDateTimeFormat.cpp
@@ -2207,17 +2207,17 @@ static TimeZoneNames const* find_time_zone_names(StringView locale, StringView t
return &s_time_zones[time_zone_index];
}
-Optional<StringView> get_time_zone_name(StringView locale, StringView time_zone, CalendarPatternStyle style)
+Optional<StringView> get_time_zone_name(StringView locale, StringView time_zone, CalendarPatternStyle style, TimeZone::InDST in_dst)
{
if (auto const* data = find_time_zone_names(locale, time_zone); data != nullptr) {
size_t name_index = 0;
switch (style) {
case CalendarPatternStyle::Short:
- name_index = data->short_standard_name;
+ name_index = (in_dst == TimeZone::InDST::No) ? data->short_standard_name : data->short_daylight_name;
break;
case CalendarPatternStyle::Long:
- name_index = data->long_standard_name;
+ name_index = (in_dst == TimeZone::InDST::No) ? data->long_standard_name : data->long_daylight_name;
break;
case CalendarPatternStyle::ShortGeneric:
name_index = data->short_generic_name;