From: Paul Donald Date: Mon, 20 Oct 2025 12:36:52 +0000 (+0200) Subject: build: stop zoneinfo builder scripts changing '_' -> ' ' X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f36f014229fcda2eb962ac3c5355ab089777ac0a;p=project%2Fluci.git build: stop zoneinfo builder scripts changing '_' -> ' ' Zone names are correct when they contain an underscore, especially when the zone names are used as input to functions and libraries. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones e.g. Africa/Addis_Ababa Africa/Dar_es_Salaam Pacific/Port_Moresby This can be revised in future if some GUI aesthetic is required. Signed-off-by: Paul Donald --- diff --git a/build/zoneinfo2lua.pl b/build/zoneinfo2lua.pl index e4e637292d..c996634444 100755 --- a/build/zoneinfo2lua.pl +++ b/build/zoneinfo2lua.pl @@ -39,7 +39,8 @@ while( ! eof ZTAB ) { close ZONE; if( $tz ) { - $zone =~ s/_/ /g; + # Don't replace underscores with spaces: correct names contain underscores. + # $zone =~ s/_/ /g; $TZ{$zone} = $tz; } } diff --git a/build/zoneinfo2ucode.pl b/build/zoneinfo2ucode.pl index 941255f2f4..c902087008 100755 --- a/build/zoneinfo2ucode.pl +++ b/build/zoneinfo2ucode.pl @@ -33,7 +33,8 @@ while( ! eof ZTAB ) { close ZONE; if( $tz ) { - $zone =~ s/_/ /g; + # Don't replace underscores with spaces: correct names contain underscores. + # $zone =~ s/_/ /g; $TZ{$zone} = $tz; } }