summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-03-08 16:14:46 +0000
committerOlivier Blin <oblin@mandriva.org>2006-03-08 16:14:46 +0000
commit9e2e02c76ce087fca0c6e715f905748980c506c4 (patch)
tree5125ed281a7b3016f901a269865681b0b75ef0e9
parent77a0cb8a0b701ba376960cab7b2d774ecfc58b55 (diff)
downloaddrakx-9e2e02c76ce087fca0c6e715f905748980c506c4.tar
drakx-9e2e02c76ce087fca0c6e715f905748980c506c4.tar.gz
drakx-9e2e02c76ce087fca0c6e715f905748980c506c4.tar.bz2
drakx-9e2e02c76ce087fca0c6e715f905748980c506c4.tar.xz
drakx-9e2e02c76ce087fca0c6e715f905748980c506c4.zip
reload sys clock from hc once we know the real timezone (#21511)
-rwxr-xr-xperl-install/standalone/finish-install2
-rw-r--r--perl-install/timezone.pm6
2 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 1a20b5f25..ee8c89941 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -56,6 +56,8 @@ sub ask_timezone() {
$t->{timezone} = $in->ask_from_treelist(N("Timezone"), N("Which is your timezone?"), '/', [ timezone::getTimeZones() ], $t->{timezone}) or return;
$t->{UTC} = $in->ask_yesorno(N("Timezone"), N("Is your hardware clock set to GMT?"), $t->{UTC});
timezone::write($t);
+ #- reload sys clock from hc once we know the real timezone
+ timezone::reload_sys_clock($t);
}
sub ask_network() {
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 1182c8c41..5abf39751 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -56,6 +56,12 @@ sub write {
});
}
+sub reload_sys_clock {
+ my ($t) = @_;
+ require run_program;
+ run_program::run('hwclock', '--hctosys', ($t->{UTC} ? '--utc' : '--localtime'));
+}
+
#- best guesses for a given country
my %c2t = (
'AM' => 'Asia/Yerevan',