mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:07:40 +00: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:
parent
d627367489
commit
ccce9e5c7f
1 changed files with 2 additions and 2 deletions
|
@ -177,9 +177,9 @@ static String format_identifier(StringView owner, String identifier)
|
||||||
auto offset = identifier.substring_view(gmt_time_zone.length());
|
auto offset = identifier.substring_view(gmt_time_zone.length());
|
||||||
|
|
||||||
if (offset.starts_with('+'))
|
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('-'))
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue