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 <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2025-10-20 14:36:52 +02:00
parent b47c94cabb
commit f36f014229
2 changed files with 4 additions and 2 deletions

View File

@@ -39,7 +39,8 @@ while( ! eof ZTAB ) {
close ZONE; close ZONE;
if( $tz ) { if( $tz ) {
$zone =~ s/_/ /g; # Don't replace underscores with spaces: correct names contain underscores.
# $zone =~ s/_/ /g;
$TZ{$zone} = $tz; $TZ{$zone} = $tz;
} }
} }

View File

@@ -33,7 +33,8 @@ while( ! eof ZTAB ) {
close ZONE; close ZONE;
if( $tz ) { if( $tz ) {
$zone =~ s/_/ /g; # Don't replace underscores with spaces: correct names contain underscores.
# $zone =~ s/_/ /g;
$TZ{$zone} = $tz; $TZ{$zone} = $tz;
} }
} }