summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-03-08 16:14:05 +0000
committerOlivier Blin <oblin@mandriva.org>2006-03-08 16:14:05 +0000
commit9374ff78bb829e975264f6324617e8b220a8f775 (patch)
treed6b91577f6a99b25185b47ef900ad5a6cfb896e2
parent622a3207dbbdcfc1de51ace512800d2b0bc8a747 (diff)
downloaddrakx-9374ff78bb829e975264f6324617e8b220a8f775.tar
drakx-9374ff78bb829e975264f6324617e8b220a8f775.tar.gz
drakx-9374ff78bb829e975264f6324617e8b220a8f775.tar.bz2
drakx-9374ff78bb829e975264f6324617e8b220a8f775.tar.xz
drakx-9374ff78bb829e975264f6324617e8b220a8f775.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',