mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-01 20:07:38 +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
@@ -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