summaryrefslogtreecommitdiffstats
path: root/perl-install/timezone.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/timezone.pm')
-rw-r--r--perl-install/timezone.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 4f72f4d58..ec252c603 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -7,11 +7,12 @@ use common;
use log;
sub get_timezone_prefix() {
- "/usr/share/zoneinfo";
+ my $prefix = $::testing ? '' : $::prefix;
+ $prefix . "/usr/share/zoneinfo";
}
sub getTimeZones() {
- my $tz_prefix = ($::testing ? '' : $::prefix) . get_timezone_prefix();
+ my $tz_prefix = get_timezone_prefix();
open(my $F, "cd $tz_prefix && find [A-Z]* -noleaf -type f |");
my @l = difference2([ chomp_(<$F>) ], [ 'ROC', 'PRC' ]);
close $F or die "cannot list the available zoneinfos";