summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-01-10 16:41:08 -0500
committerLinus Groh <mail@linusgroh.de>2022-01-11 00:36:45 +0100
commitccce9e5c7f9a91c25aa7211917bc823d67594703 (patch)
tree3c5f92cb9039d9abaccd8fdcbca69a7826e7874a
parentd6273674896445504ba6dc61a53cc5c0e23071b8 (diff)
downloadserenity-ccce9e5c7f9a91c25aa7211917bc823d67594703.zip
LibTimeZone: Tweak the enumeration generated for parsed time zones
For example, generate "Etc/GMT+12" as "Etc_GMT_Ahead_12" (instead of as "Etc_GMT_P12"). A little clearer what the name means without having to know off-hand what "P" was representing.
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
index 593a9811b7..bdb7ccbdfd 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp
@@ -177,9 +177,9 @@ static String format_identifier(StringView owner, String identifier)
auto offset = identifier.substring_view(gmt_time_zone.length());
if (offset.starts_with('+'))
- identifier = String::formatted("{}_P{}", gmt_time_zone, offset.substring_view(1));
+ identifier = String::formatted("{}_Ahead_{}", gmt_time_zone, offset.substring_view(1));
else if (offset.starts_with('-'))
- identifier = String::formatted("{}_M{}", gmt_time_zone, offset.substring_view(1));
+ identifier = String::formatted("{}_Behind_{}", gmt_time_zone, offset.substring_view(1));
}
}