diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-24 18:36:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-11-24 18:36:59 +0000 |
commit | 8a606f702f7972827dd458d4155328983d36e893 (patch) | |
tree | 3908ce5e5549b890daa7bf1a4dab277df338f1d2 /perl-install/network | |
parent | 76ccdfa6c7a4892f737f11292d5ccd7249a6f766 (diff) | |
download | drakx-8a606f702f7972827dd458d4155328983d36e893.tar drakx-8a606f702f7972827dd458d4155328983d36e893.tar.gz drakx-8a606f702f7972827dd458d4155328983d36e893.tar.bz2 drakx-8a606f702f7972827dd458d4155328983d36e893.tar.xz drakx-8a606f702f7972827dd458d4155328983d36e893.zip |
reintroduce detect_timezone (indeed that one was needed :-()
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/tools.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 112d56140..544833fc7 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -140,6 +140,25 @@ sub ask_info2 { 1; } +sub detect_timezone() { + my %tmz2country = ( + 'Europe/Paris' => N("France"), + 'Europe/Amsterdam' => N("Netherlands"), + 'Europe/Rome' => N("Italy"), + 'Europe/Brussels' => N("Belgium"), + 'America/New_York' => N("United States"), + 'Europe/London' => N("United Kingdom") + ); + my %tm_parse = MDK::Common::System::getVarsFromSh('/etc/sysconfig/clock'); + my @country; + foreach (keys %tmz2country) { + if ($_ eq $tm_parse{ZONE}) { + unshift @country, $tmz2country{$_}; + } else { push @country, $tmz2country{$_} }; + } + \@country; +} + sub connected() { gethostbyname("mandrakesoft.com") ? 1 : 0 } my $kid_pipe; |