diff options
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/finish-install | 2 | ||||
-rw-r--r-- | perl-install/timezone.pm | 6 |
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', |