From ccce9e5c7f9a91c25aa7211917bc823d67594703 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 10 Jan 2022 16:41:08 -0500 Subject: [PATCH] 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. --- .../Tools/CodeGenerators/LibTimeZone/GenerateTimeZoneData.cpp | 4 ++-- 1 file 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)); } }