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.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index b6f9cb364..6330cb325 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -3,7 +3,9 @@ package timezone;
use diagnostics;
use strict;
-use common;
+use common qw(:common :system);
+use commands;
+use log;
sub getTimeZones {
@@ -15,6 +17,18 @@ sub getTimeZones {
@l;
}
+sub write($$$) {
+ my ($prefix, $t, $f) = @_;
+
+ eval { commands::cp("-f", "$prefix/usr/share/zoneinfo/$t->{timezone}", "$prefix/etc/localtime") };
+ $@ and log::l("installing /etc/localtime failed");
+ setVarsInSh($f, {
+ ZONE => $t->{timezone},
+ GMT => bool2text($t->{GMT}),
+ ARC => "false",
+ });
+}
+
my %l2t = (
'Danish (Denmark)' => 'Europe/Copenhagen',
'English (USA)' => 'America/New_York',