mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
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.
This commit is contained in:
committed by
Linus Groh
parent
d627367489
commit
ccce9e5c7f
Notes:
sideshowbarker
2024-07-17 21:13:37 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/ccce9e5c7f9 Pull-request: https://github.com/SerenityOS/serenity/pull/11799 Reviewed-by: https://github.com/linusg ✅
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user